Homec4science

Improve Conduit performance of special edge-based custom Revision fields

Authored by epriestley <git@epriestley.com> on Jul 31 2016, 17:50.

Description

Improve Conduit performance of special edge-based custom Revision fields

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.

Reviewers: yelirekim, chad

Reviewed By: chad

Maniphest Tasks: T11404

Differential Revision: https://secure.phabricator.com/D16352

Details

Committed
epriestley <git@epriestley.com>Jul 31 2016, 20:24
Pushed
aubortJan 31 2017, 17:16
Parents
rPHb8f75f95116e: Improve Conduit performance for custom fields
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH8fd20e82fcc6: Improve Conduit performance of special edge-based custom Revision fields (authored by epriestley <git@epriestley.com>).Jul 31 2016, 20:24