Page MenuHomePhabricator

Improve performance when constructing custom fields for objects
ClosedPublic

Authored by epriestley on Jul 31 2016, 4:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 4:27 AM
Unknown Object (File)
Sun, Dec 8, 6:58 PM
Unknown Object (File)
Wed, Dec 4, 11:41 PM
Unknown Object (File)
Wed, Dec 4, 12:04 PM
Unknown Object (File)
Tue, Dec 3, 10:10 PM
Unknown Object (File)
Tue, Dec 3, 8:43 PM
Unknown Object (File)
Tue, Dec 3, 5:31 PM
Unknown Object (File)
Sun, Dec 1, 3:26 AM
Subscribers
None

Details

Summary

Ref T11404. This improves things by about 10%:

  • Use PhutilClassMapQuery, which has slightly better caching.
  • Do a little less work to generate pretty error messages.
  • Make the "disabled" code a little faster (and sort of clearer, too?) by doing less fancy stuff.

These are pretty minor adjustments and not the sort of optimizations I'd make normally, but this code gets called ~100x (once per revision) and generates ~10 fields normally, so even small savings can amount to something.

(I also want to try to make arc faster in the next update, and improving Conduit performance helps with that.)

Test Plan

Ran differential.revision.search, saw cost drop from ~195ms to ~170ms locally.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve performance when constructing custom fields for objects.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added reviewers: chad, yelirekim.
chad edited edge metadata.
This revision is now accepted and ready to land.Jul 31 2016, 5:04 PM
This revision was automatically updated to reflect the committed changes.