discourse/config/environments
Alan Guo Xiang Tan 5cfe323445
PERF: Strict loading for SidebarSection queries (#21717)
What is this change required?

I noticed that actions in `SidebarSectionsController` resulted in
lots of N+1 queries problem and I wanted a solution to
prevent such problems without having to write N+1 queries tests. I have
also used strict loading for `SidebarSection` queries in performance
sensitive spots.

Note that in this commit, I have also set `config.active_record.action_on_strict_loading_violation = :log`
for the production environment so that we have more visibility of
potential N+1 queries problem in the logs. In development and test
environment, we're sticking with the default of raising an error.
2023-05-25 09:10:32 +08:00
..
development.rb DEV: Check Zeitwerk eager loading in GitHub CI (#20699) 2023-03-16 14:22:16 +00:00
production.rb PERF: Strict loading for SidebarSection queries (#21717) 2023-05-25 09:10:32 +08:00
profile.rb DEV: Apply syntax_tree formatting to `config/*` 2023-01-09 11:13:29 +00:00
test.rb DEV: Check Zeitwerk eager loading in GitHub CI (#20699) 2023-03-16 14:22:16 +00:00