Page MenuHomePhabricator

Don't issue a bazillion queries to load Differential object lists
ClosedPublic

Authored by epriestley on Feb 19 2014, 1:35 AM.
Tags
None
Referenced Files
F14019926: D8277.id19697.diff
Tue, Nov 5, 11:47 PM
F14013598: D8277.diff
Sat, Nov 2, 7:56 AM
F13984543: D8277.diff
Sun, Oct 20, 2:05 PM
F13966434: D8277.id19697.diff
Wed, Oct 16, 8:01 AM
F13962893: D8277.id.diff
Tue, Oct 15, 12:50 PM
Unknown Object (File)
Sep 29 2024, 2:10 AM
Unknown Object (File)
Sep 22 2024, 10:04 AM
Unknown Object (File)
Sep 20 2024, 8:44 PM
Subscribers
Tokens
"Mountain of Wealth" token, awarded by chad."Mountain of Wealth" token, awarded by btrahan.

Details

Reviewers
btrahan
Maniphest Tasks
Restricted Maniphest Task
Commits
Restricted Diffusion Commit
rP50ed42761ce9: Don't issue a bazillion queries to load Differential object lists
Summary

Ref T3496. Currently, we call loadAssets() on each revision table, which invokes a new revision query and a pile of subqueries.

Instead, add needFlags() and needDrafts() to RevisionQuery. Some day these could perhaps be more generic.

Test Plan
  • Viewed home, differential, etc., no longer saw 9203809238 queries being run for no reason.
  • Drafts and flags still appear properly.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

awesometown

divided by

9203809238

equals

awesometown

well okay 9203809238 is more like 9 or something but that's still more than 0!!~