1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 11:22:40 +01:00
phorge-phorge/src/applications/differential/conduit
epriestley 8fd20e82fc 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
2016-07-31 11:24:58 -07:00
..
DifferentialCloseConduitAPIMethod.php Modularize content sources 2016-03-26 11:59:45 -07:00
DifferentialConduitAPIMethod.php Improve Conduit performance of special edge-based custom Revision fields 2016-07-31 11:24:58 -07:00
DifferentialCreateCommentConduitAPIMethod.php Modularize content sources 2016-03-26 11:59:45 -07:00
DifferentialCreateDiffConduitAPIMethod.php Modularize content sources 2016-03-26 11:59:45 -07:00
DifferentialCreateInlineConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialCreateRawDiffConduitAPIMethod.php Modularize content sources 2016-03-26 11:59:45 -07:00
DifferentialCreateRevisionConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialFindConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialGetAllDiffsConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialGetCommitMessageConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialGetCommitPathsConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialGetDiffConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialGetRawDiffConduitAPIMethod.php Give Conduit params/return/errors protected visibility 2015-04-13 11:58:35 -07:00
DifferentialGetRevisionCommentsConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00
DifferentialGetRevisionConduitAPIMethod.php Remove arcanist projects from differential 2015-05-19 00:36:52 +10:00
DifferentialParseCommitMessageConduitAPIMethod.php Give Conduit params/return/errors protected visibility 2015-04-13 11:58:35 -07:00
DifferentialQueryConduitAPIMethod.php Revision substate CLOSED_FROM_ACCEPTED 2016-06-27 20:29:47 +00:00
DifferentialQueryDiffsConduitAPIMethod.php Remove arcanist projects from differential 2015-05-19 00:36:52 +10:00
DifferentialRevisionSearchConduitAPIMethod.php Implement basic differential.revision.search 2016-06-09 09:06:58 -07:00
DifferentialSetDiffPropertyConduitAPIMethod.php Remove some obsolete lint and unit support 2015-08-10 14:16:25 -07:00
DifferentialUpdateRevisionConduitAPIMethod.php phtize all the things 2015-05-22 21:16:39 +10:00