LibreCat
LibreCat copied to clipboard
publication_count() is slow
publication_count() in index_user.fix slows makes indexing the user table 20 to 200 times slower. It should be rewritten or turned into an asynchronous job.
Basically, this feature was intended for batch jobs. The described behaviour was not intended. So how to distinguish that as they use the same code base.
If we move this to the model, we can do: publications->add($stream, skip_before_add => ['publication_count'])
Turning these fix steps into hooks is generally preferred probably, as they make turning features on and off possible.