Page MenuHomePhabricator

Improve Conduit performance of special edge-based custom Revision fields
ClosedPublic

Authored by epriestley on Jul 31 2016, 4:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 7:13 AM
Unknown Object (File)
Sun, Dec 8, 12:29 PM
Unknown Object (File)
Tue, Dec 3, 2:55 PM
Unknown Object (File)
Thu, Nov 28, 10:18 AM
Unknown Object (File)
Thu, Nov 28, 10:14 AM
Unknown Object (File)
Thu, Nov 28, 8:44 AM
Unknown Object (File)
Wed, Nov 27, 10:26 AM
Unknown Object (File)
Wed, Nov 27, 9:33 AM
Subscribers
None

Details

Summary

Ref T11404. Depends on D16351. Currently, both differential.query and differential.revision.search issue 2N queries to fetch:

  • dependencies for each revision; and
  • projects for each revision.

Fix this:

  • Take these custom fields out of Conduit so they don't load this data by default.
  • For differential.query, put this data back in by hard coding it.
  • For differential.revision.search, just leave it out. You can already optionally get projects efficiently, and this endpoint is a work in progress. I would tentatively be inclined to expose graph data as a "graph" extension once we need it.

This makes both methods execute in O(1) time (which is still 20-30 queries, but at least it's not 320 queries anymore).

Test Plan
  • Ran differential.query, observed no change in results but 199 fewer internal queries.
  • Ran differential.revision.search, observed data gone from results and 200 fewer internal queries.

Diff Detail

Repository
rP Phabricator
Branch
cfield3
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13202
Build 16910: Run Core Tests
Build 16909: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Improve Conduit performance of special edge-based custom Revision fields.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, yelirekim.
chad edited edge metadata.
This revision is now accepted and ready to land.Jul 31 2016, 4:35 PM
This revision was automatically updated to reflect the committed changes.