Page MenuHomePhabricator

Improve Conduit performance for custom fields
ClosedPublic

Authored by epriestley on Jul 31 2016, 3:46 PM.
Tags
None
Referenced Files
F13997568: D16351.diff
Thu, Oct 24, 5:09 AM
F13984193: D16351.diff
Sun, Oct 20, 11:34 AM
F13968677: D16351.id39322.diff
Oct 16 2024, 10:41 PM
Unknown Object (File)
Oct 13 2024, 12:21 PM
Unknown Object (File)
Oct 5 2024, 6:37 PM
Unknown Object (File)
Oct 5 2024, 2:59 PM
Unknown Object (File)
Oct 5 2024, 4:47 AM
Unknown Object (File)
Oct 5 2024, 4:45 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
Branch
cfield2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 13200
Build 16906: Run Core Tests
Build 16905: arc lint + arc unit

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.