1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications
epriestley 1f3fcce6fe Provide a cached class map query for making key-based class lookups more efficient
Summary:
Ref T11954. Depends on D16993. We have a couple of "look up the class for this key" queries which are costly enough to show up on a profile.

These aren't huge wins, but they're pretty easy. We currently do this like this:

```
$class_map = load_every_subclass();
return idx($class_map, $key);
```

However, we don't need to load EVERY subclass if we're only looking for, say, the Conduit method subclass which implements `user.whoami`. This allows us to cache that map and find the right class efficiently.

This cache is self-validating and completely safe even in development.

Test Plan:
  - Used `curl` to make queries to `user.whoami`, verified that content was identical before and after the change.
  - Used `ab -n100` to roughly measure 99th percentile time, which dropped from 74ms to 65ms. This is a small improvement (13% in the best case, here) but it benefits every Conduit method call.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11954

Differential Revision: https://secure.phabricator.com/D16994
2016-12-06 08:34:29 -08:00
..
almanac Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
aphlict Discard stdout/stderr from the aphlict subprocess when running in daemon (normal) mode 2016-11-13 16:43:42 -08:00
arcanist/conduit Remove remaining arcanist project code 2015-07-08 19:37:28 +10:00
audit Fix a Herald issue where testing commits against rules with revision-related conditions would fail 2016-09-08 17:16:40 -07:00
auth Remove the Persona login method 2016-12-05 15:57:15 -08:00
badges Remove some no-op "canUninstall()" Application methods 2016-12-05 11:02:25 -08:00
base Allow logged-out users to load global preferences on installs without public viewers 2016-12-05 11:00:39 -08:00
cache Provide a cached class map query for making key-based class lookups more efficient 2016-12-06 08:34:29 -08:00
calendar Set the viewer timezone properly on Calendar event RecurrenceSet objects 2016-12-02 07:29:48 -08:00
celerity Support ".ico" in Celerity and simplify rewite rule configuration 2016-10-20 11:28:11 -07:00
chatlog Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
conduit Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
config Add IPv6 reserved addresses to the default outbound blacklist 2016-12-05 11:20:13 -08:00
conpherence Use PhutilQueryCompiler in Phabricator fulltext search 2016-11-25 14:46:10 -08:00
console Remove "mysql.implementation" configuration 2016-11-22 04:15:34 -08:00
countdown Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
daemon Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
dashboard Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
differential Prettier file embeds 2016-11-27 14:57:06 -08:00
diffusion When viewing a branch, preview differences from master 2016-12-06 08:16:41 -08:00
diviner Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
doorkeeper Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
draft/storage Clean up some log spam caused by races in VersionedDraft 2016-09-05 13:01:53 -07:00
drydock Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
fact Update Facts for newPage 2016-04-03 15:07:52 -07:00
feed Prevent media from autoplaying when rendered as a feed story 2016-11-22 14:19:56 -08:00
files Prettier file embeds 2016-11-27 14:57:06 -08:00
flag Move FontIcon calls to Icon 2016-01-28 08:48:45 -08:00
fund Consistently refer to 'Projects' as 'Tags' 2016-04-19 16:48:21 +00:00
guides Add a bunch of Phacility-specific code to the upstream, thinly veiled as generic code 2016-11-15 09:11:22 -08:00
harbormaster Allow "Wait for Message" to be unset on build plans 2016-11-22 14:02:37 -08:00
help Use "book" instead of "life ring" icon for global help menu 2016-10-28 14:33:18 -07:00
herald Fix a Herald issue where testing commits against rules with revision-related conditions would fail 2016-09-08 17:16:40 -07:00
home Revert "Clean up more Quicksand" 2016-10-01 12:58:30 -07:00
legalpad Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
lipsum Modularize content sources 2016-03-26 11:59:45 -07:00
macro Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
maniphest Strip restricted and incomplete handles from the "Mentions" tab on Maniphest tasks 2016-11-18 14:08:20 -08:00
meta Fix policy capitalization 2016-10-20 17:34:59 -07:00
metamta Make Herald test workflow modular and more clear 2016-08-03 16:12:33 -07:00
multimeter Add a cluster.read-only option 2016-04-09 13:40:47 -07:00
notification Add an icon to aphlict connection status 2016-10-02 08:17:21 -07:00
nuance Remove some no-op "canUninstall()" Application methods 2016-12-05 11:02:25 -08:00
oauthserver Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
owners Allow transactions to specialize their mail headers for diff sections 2016-11-07 12:16:39 -08:00
packages Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
passphrase Make Passphrase "token" credentials accessible via the API 2016-11-15 09:12:35 -08:00
paste Allow transactions to specialize their mail headers for diff sections 2016-11-07 12:16:39 -08:00
people Normalize remote IP addresses when writing to logs, etc 2016-12-05 11:20:29 -08:00
phame Allow custom Sites to have custom 404 controllers 2016-11-30 15:25:09 -08:00
phid Strip restricted and incomplete handles from the "Mentions" tab on Maniphest tasks 2016-11-18 14:08:20 -08:00
phlux Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
pholio Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
phortune When a Phortune subscription has a removed payment method, be more explicit about it 2016-11-23 14:07:40 -08:00
phpast Update phpast for new UI 2016-04-05 13:52:59 -07:00
phragment Remove some no-op "canUninstall()" Application methods 2016-12-05 11:02:25 -08:00
phrequent Redesign Config Application 2016-08-29 15:49:49 -07:00
phriction Fix Phriction document move on to existing document placeholder 2016-10-18 11:58:24 +00:00
phurl Don't send Phurl mail to the URL object itself 2016-11-15 09:12:15 -08:00
policy Fix some policy CSS 2016-11-11 13:43:13 -08:00
ponder Make "Core Applications" more reasonable 2016-08-12 07:57:59 -07:00
project Add sidenav back to workboards 2016-11-30 09:56:55 -08:00
releeph Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
remarkup/conduit
repository Modernize UI for "Compare" in Diffusion 2016-12-05 18:10:11 -08:00
search When running a fulltext query with no query, enforce order by document creation date 2016-11-29 12:14:57 -08:00
settings Allow logged-out users to load global preferences on installs without public viewers 2016-12-05 11:00:39 -08:00
slowvote Prepare for event imports in Calendar 2016-10-12 10:45:31 -07:00
spaces Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
subscriptions Allow stacked comment actions to be explicitly ordered 2016-04-06 09:15:27 -07:00
support/application
system Support ".ico" in Celerity and simplify rewite rule configuration 2016-10-20 11:28:11 -07:00
tokens Remove empty implementations of describeAutomaticCapabilities() 2016-11-09 15:24:22 -08:00
transactions Ignore Calendar date edits which just change the internal date timezone without rescheduling it 2016-11-28 10:33:59 -08:00
typeahead Move testcase file to right place 2016-11-22 18:54:15 +00:00
uiexample Add setBackground to PHUIIconView 2016-08-19 13:19:53 -07:00
xhprof Removing deprecated method calls 2016-08-23 03:26:34 -05:00