Отключённые плагины всё ещё влияют на производительность

Since a lot of plugins have been bundled with core, we’ve been seeing some performance impact.

When investigating, it turned out that some plugins are still injecting certain queries, even when disabled.

An example is the topic voting plugin.

The topic filter and the search filter and search order are always injected and active.

The code should be fenced with SiteSetting.topic_voting_enabled. Or maybe calls like register_search_advanced_filter should behave more like add_to_serializer and check if the plugin is enabled.

14 лайков

Thank you for the report. I’ve tagged this pri-medium for now and someone from the team will look at it soon.

Also putting a pr-welcome on this :slight_smile:

4 лайка

I just finished a PR making most of the `register_*` calls behave like add_to_serializer:

4 лайка

The PR has just been merged, it should be available in latest shortly :slight_smile:

3 лайка

Thanks, that is fantastic :heart_eyes:
Would a backport to stable be a possibility for this fix ?

3 лайка

Sure, I just created a PR:

3 лайка