1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-26 06:28:19 +01:00
phorge-phorge/src/infrastructure/customfield/storage
epriestley b8f75f9511 Improve Conduit performance for custom fields
Summary:
Ref T11404. Depends on D16350.

Currently, custom fields can issue "N+1" queries in some cases, so querying 100 revisions issues 100 extra queries.

This affects all `*.search` endpoints for objects with custom fields, and some older endpoints (notably `differential.query`).

This change bulk loads "normal" custom fields, which gets rid of some of these queries. Instead of loading fields for each object, we build a big list of all fields and load them all at once.

The next change will tackle the remaining inefficient edge queries.

Test Plan:
  - Configured a custom field with normal database storage in Differential.
  - Ran `differential.query`, looking at custom fields in results for correctness.
  - Ran `differential.revision.search`, looking at custom fields in results for correctness.
  - In both cases, observed queries drop from `3N` to `2N` (all the "normal" custom field stuff got bulk loaded).

Reviewers: yelirekim, chad

Reviewed By: chad

Maniphest Tasks: T11404

Differential Revision: https://secure.phabricator.com/D16351
2016-07-31 11:15:58 -07:00
..
PhabricatorCustomFieldIndexStorage.php phtize all the things 2015-05-22 21:16:39 +10:00
PhabricatorCustomFieldNumericIndexStorage.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
PhabricatorCustomFieldStorage.php Improve Conduit performance for custom fields 2016-07-31 11:15:58 -07:00
PhabricatorCustomFieldStringIndexStorage.php Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00