Homec4science

Improve settings caches on fast paths like Conduit

Authored by epriestley <git@epriestley.com> on Dec 6 2016, 14:02.

Description

Improve settings caches on fast paths like Conduit

Summary:
Ref T11954. This reduces how much work we need to do to load settings, particularly for Conduit (which currently can not benefit directly from the user cache, because it loads the user indirectly via a token).

Specifically:

  • Cache builtin defaults in the runtime cache. This means Phabricator may need to be restarted if you change a global setting default, but this is exceptionally rare.
  • Cache global defaults in the mutable cache. This means we do less work to load them.
  • Avoid loading settings classes if we don't have to.
  • If we missed the user cache for settings, try to read it from the cache table before we actually go regenerate it (we miss on Conduit pathways).

Test Plan: Used ab -n100 ... to observe a ~6-10ms performance improvement for user.whoami.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11954

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

Details

Committed
epriestley <git@epriestley.com>Dec 6 2016, 18:12
Pushed
aubortJan 31 2017, 17:16
Parents
rPH125fb332de72: Introduce a serializing key-value cache proxy
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHf45a13cff406: Improve settings caches on fast paths like Conduit (authored by epriestley <git@epriestley.com>).Dec 6 2016, 18:12