Homec4science

Improve performance when constructing custom fields for objects

Authored by epriestley <git@epriestley.com> on Jul 31 2016, 18:41.

Description

Improve performance when constructing custom fields for objects

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.

Reviewers: yelirekim, chad

Reviewed By: chad

Maniphest Tasks: T11404

Differential Revision: https://secure.phabricator.com/D16355

Details

Committed
epriestley <git@epriestley.com>Jul 31 2016, 20:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPH64886b11d8d1: Remove expensive, pointless typeachecking in custom fields
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1b192f746a67: Improve performance when constructing custom fields for objects (authored by epriestley <git@epriestley.com>).Jul 31 2016, 20:25