@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use PhabricatorCachedClassMapQuery in Conduit method lookups

Summary: Ref T11954. Depends on D16994. This implements the Conduit method cache described in that revision for a small global Conduit performance improvement.

Test Plan: Verified Conduit has the same behavior at lower cost. See D16994 for details.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11954

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

+9 -4
+9 -4
src/applications/conduit/method/ConduitAPIMethod.php
··· 158 158 } 159 159 160 160 public static function loadAllConduitMethods() { 161 + return self::newClassMapQuery()->execute(); 162 + } 163 + 164 + private static function newClassMapQuery() { 161 165 return id(new PhutilClassMapQuery()) 162 166 ->setAncestorClass(__CLASS__) 163 - ->setUniqueMethod('getAPIMethodName') 164 - ->execute(); 167 + ->setUniqueMethod('getAPIMethodName'); 165 168 } 166 169 167 170 public static function getConduitMethod($method_name) { 168 - $method_map = self::loadAllConduitMethods(); 169 - return idx($method_map, $method_name); 171 + return id(new PhabricatorCachedClassMapQuery()) 172 + ->setClassMapQuery(self::newClassMapQuery()) 173 + ->setMapKeyMethod('getAPIMethodName') 174 + ->loadClass($method_name); 170 175 } 171 176 172 177 public function shouldRequireAuthentication() {