Page MenuHomePhabricator

Reduce the cost of loading large numbers of macros
ClosedPublic

Authored by epriestley on Sep 6 2014, 12:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 4, 11:55 AM
Unknown Object (File)
Sun, Dec 1, 6:07 AM
Unknown Object (File)
Nov 21 2024, 1:36 PM
Unknown Object (File)
Nov 11 2024, 10:45 AM
Unknown Object (File)
Nov 6 2024, 4:56 PM
Unknown Object (File)
Oct 28 2024, 11:04 PM
Unknown Object (File)
Oct 25 2024, 9:33 PM
Unknown Object (File)
Oct 25 2024, 6:21 AM

Details

Summary

Ref T6013. I accidentally made this cost explosviely huge when fixing macros for logged out users in D10411.

Specifically, we'd load all the macros, which would load all the files, which would load all the macros (to do policy checks), which would fill out of cache I think (but maybe only some of the time?). Anyway, bad news.

Instead, only load the files if we need them.

Test Plan

Viewed macro main page, macro detail, used a macro, used a meme, edited a macro, edited audio.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Reduce the cost of loading large numbers of macros.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: btrahan, csilvers.
csilvers edited edge metadata.

I'm happy to approve this, in the interests of fixing our install!

I actually understand the diff; the only thing I can't really review competently is whether there are any places you needed to add needsFiles(true) that are missed currently.

This revision is now accepted and ready to land.Sep 6 2014, 12:27 AM
epriestley updated this revision to Diff 25088.

Closed by commit rPb772a2b92af5 (authored by @epriestley).