impress/app
Matchu 7948974949 Do preloading manually on user list pages, to reduce memory usage
I used the new profiler tools on this page, and noticed a lot of
allocations in the Globalize library, which we use for translating
database records. I realized that we were loading all of the fields of
not just all of the items on the page, but all of their translation
records in all locales! We used to scrape data for lots of languages, so
that can be quite a lot!

Unfortunately, Rails's `includes` method to efficiently preload related
records always loads all fields, and simply can't be overridden.

So, in this change we write manual preloading code, to identify the
records we need, load them in big bulk queries, and assign them back to
the appropriate associations. Basically just what `includes` does, but
written out a bit more, to give us the chance to specify SELECT and
WHERE clauses!
2023-10-27 19:42:02 -07:00
..
assets Remove unused Javascript utility libraries 2023-10-25 16:24:50 -07:00
controllers Do preloading manually on user list pages, to reduce memory usage 2023-10-27 19:42:02 -07:00
helpers Remove unused Javascript utility libraries 2023-10-25 16:24:50 -07:00
javascript Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
mailers donation mailer 2014-09-10 14:32:54 -05:00
models Do preloading manually on user list pages, to reduce memory usage 2023-10-27 19:42:02 -07:00
views Remove unused Javascript utility libraries 2023-10-25 16:24:50 -07:00