ChangeJson: Less eager loading of patch sets
Normal search results do not include the MESSAGES or any REVISION options, so they should not need to load the current revision from the PatchSets table (assuming mergeability cache hits). This was just wasted DB access, accounting for up to 20% of query traffic. Change-Id: I641d4af1a71391bcd18ded838224d7a3ee3f57d7
This commit is contained in:
committed by
David Pursehouse
parent
a031b8063e
commit
92c3fd88aa
@@ -264,7 +264,7 @@ public class ChangeJson {
|
||||
ChangeData.ensureChangeLoaded(all);
|
||||
if (has(ALL_REVISIONS)) {
|
||||
ChangeData.ensureAllPatchSetsLoaded(all);
|
||||
} else {
|
||||
} else if (has(CURRENT_REVISION) || has(MESSAGES)) {
|
||||
ChangeData.ensureCurrentPatchSetLoaded(all);
|
||||
}
|
||||
Set<Change.Id> reviewed = Sets.newHashSet();
|
||||
|
||||
Reference in New Issue
Block a user