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
F19064268: D8277.id.diff
Nov 29 2025, 8:26 PM
F19057224: D8277.diff
Nov 28 2025, 9:37 PM
F18993648: D8277.id.diff
Nov 19 2025, 8:13 AM
F18870569: D8277.id.diff
Nov 4 2025, 6:00 PM
F18854791: D8277.diff
Nov 1 2025, 12:38 AM
F18840004: D8277.id.diff
Oct 27 2025, 8:33 PM
F18836085: D8277.diff
Oct 26 2025, 9:56 PM
F18759244: D8277.diff
Oct 6 2025, 2:38 AM
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!!~