Page MenuHomePhabricator

Improve Conduit performance for custom fields
ClosedPublic

Authored by epriestley on Jul 31 2016, 3:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 27, 12:30 PM
Unknown Object (File)
Fri, Mar 22, 7:46 PM
Unknown Object (File)
Fri, Mar 22, 7:46 PM
Unknown Object (File)
Wed, Mar 20, 9:54 AM
Unknown Object (File)
Feb 22 2024, 12:14 AM
Unknown Object (File)
Feb 3 2024, 11:33 AM
Unknown Object (File)
Jan 29 2024, 7:23 PM
Unknown Object (File)
Dec 27 2023, 8:34 AM
Subscribers
None

Details

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).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve Conduit performance for custom fields.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, yelirekim.
  • Fix some array_mergev() junk I refactored into not working.
chad edited edge metadata.
This revision is now accepted and ready to land.Jul 31 2016, 4:23 PM
This revision was automatically updated to reflect the committed changes.