1
0
Fork 0
forked from OpenNeo/impress
Dress to Impress, a big fancy Neopets customization tool!
Find a file
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
.devcontainer Build wardrobe-2020 JS during dev container setup 2023-10-26 21:39:42 +00:00
.vscode Add the Pardon Our Dust page 2023-10-23 19:05:09 -07:00
app Do preloading manually on user list pages, to reduce memory usage 2023-10-27 19:42:02 -07:00
bin Upgrade to Rails 7.1.1 2023-10-25 15:05:31 -07:00
config Add mini profiler to each page 2023-10-27 19:38:49 -07:00
db Stop orphaning hangers when deleting lists 2023-10-24 15:35:21 -07:00
deploy Kill the app at high RAM, instead of trying to throttle it first 2023-10-27 17:03:08 -07:00
lib Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
public Stop saving local copies of SWFs 2023-10-23 19:05:10 -07:00
test Remove unused automated testing files & gems 2023-10-25 16:09:01 -07:00
vendor Add mini profiler to each page 2023-10-27 19:38:49 -07:00
.gitignore Add .env.* to gitignore 2023-10-27 17:44:12 -07:00
.ruby-version Upgrade to Ruby 3.1.4 2023-10-23 19:05:07 -07:00
config.ru Upgrade to Rails 6.1.7.4 2023-10-23 19:05:07 -07:00
Gemfile Add mini profiler to each page 2023-10-27 19:38:49 -07:00
Gemfile.lock Add mini profiler to each page 2023-10-27 19:38:49 -07:00
LICENSE.md Update our license 2023-10-23 19:04:56 -07:00
package.json Build wardrobe-2020 JS during dev container setup 2023-10-26 21:39:42 +00:00
Procfile.dev Bundle wardrobe-2020 into the app 2023-10-23 19:05:08 -07:00
Rakefile Uninstall resque 2023-10-23 19:05:04 -07:00
README.md Oops, needs to be a README.md file! 2023-10-25 16:31:41 -07:00
yarn.lock Add Prettier to dev dependencies 2023-10-24 16:37:06 -07:00

Dress to Impress beach logo

Dress to Impress

Oh! We've been revitalizing the Rails app! Fun!

There'll be more to say about it here soon :3