Page MenuHomePhabricator

Improve settings caches on fast paths like Conduit
ClosedPublic

Authored by epriestley on Dec 6 2016, 1:10 PM.
Tags
None
Referenced Files
F15443780: D16998.id40903.diff
Thu, Mar 27, 6:08 AM
F15442363: D16998.id.diff
Wed, Mar 26, 10:57 PM
F15442268: D16998.id40890.diff
Wed, Mar 26, 10:29 PM
F15438617: D16998.id40903.diff
Wed, Mar 26, 2:04 AM
F15435503: D16998.diff
Tue, Mar 25, 8:38 AM
F15413714: D16998.id40890.diff
Wed, Mar 19, 8:48 PM
F15389426: D16998.id40890.diff
Sat, Mar 15, 5:14 AM
F15334543: D16998.id40903.diff
Sat, Mar 8, 10:18 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Branch
ccache7
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14776
Build 19321: Run Core Tests
Build 19320: arc lint + arc unit