Homec4science

Use PhabricatorCachedClassMapQuery when querying object PHID types

Authored by epriestley <git@epriestley.com> on Dec 6 2016, 13:16.

Description

Use PhabricatorCachedClassMapQuery when querying object PHID types

Summary:
Ref T11954. When we query for Conduit tokens, we load the associated objects (users) by PHID.

Currently, querying objects by PHID requires us to load every PHIDType class, when we can know which specific classes we actually need (e.g., just UserPHIDType, if only user PHIDs are present in the query).

Use PhabricatorCachedClassMapQuery to reduce the number of classes we load on this pathway.

Test Plan:

  • Used ab -n100 to roughly measure a ~5% performance improvement?
  • This measurement feels a little flimsy but the XHProf profile is cleaner, at least.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11954

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

Details

Committed
epriestley <git@epriestley.com>Dec 6 2016, 18:10
Pushed
aubortJan 31 2017, 17:16
Parents
rPHbfbf75a8720c: Slightly modernize ConduitTokenQuery
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHf8d6b6181eb4: Use PhabricatorCachedClassMapQuery when querying object PHID types (authored by epriestley <git@epriestley.com>).Dec 6 2016, 18:10