mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 22:18:29 +08:00
7dc0f88acd
Profiling showed that we were roughly 10% of a request time creating all the ActiveRecord objects for categories in the `Site` model on a site with 61 categories. Instead of querying for the categories each time based on which categories the user can see, we can just preload all of the categories upfront and filter out the categories that the user can not see. |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
jobs | ||
mailers | ||
models | ||
serializers | ||
services | ||
views |