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
F13087997: D16355.diff
Thu, Apr 25, 1:14 AM
Unknown Object (File)
Fri, Apr 19, 5:10 PM
Unknown Object (File)
Fri, Apr 12, 9:17 AM
Unknown Object (File)
Thu, Apr 11, 8:49 AM
Unknown Object (File)
Sun, Apr 7, 12:38 AM
Unknown Object (File)
Thu, Apr 4, 9:00 PM
Unknown Object (File)
Mar 10 2024, 7:36 PM
Unknown Object (File)
Mar 5 2024, 9:40 PM
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.