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
Unknown Object (File)
Fri, Jan 17, 10:41 AM
Unknown Object (File)
Sun, Jan 12, 2:07 PM
Unknown Object (File)
Tue, Dec 31, 6:56 PM
Unknown Object (File)
Mon, Dec 30, 6:18 PM
Unknown Object (File)
Dec 22 2024, 3:14 PM
Unknown Object (File)
Dec 22 2024, 10:26 AM
Unknown Object (File)
Dec 18 2024, 12:33 PM
Unknown Object (File)
Dec 18 2024, 12:33 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable