You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cache Git configuration used in Settings for the lifetime of the process (#1172)
When enumerating all Git configuration values in `Settings`, we
currently cache a copy of all values for the lifetime of the
`GetSettingValues()` method. This saves us some calls to Git, but we can
do better.
Pull-up the cache of Git configuration entries to the lifetime of the
`Settings` object, meaning all calls to `GetSettingValues()` over the
lifetime of the process can benefit from the cache! The savings here can
be significant as each `ISettings` property typically results in a call
to `GetSettingValues()`.
Whilst in this space we can fix a couple of bugs:
1. We were not calling `git config --type=path` for `isPath = true`
variables when resolving settings, and instead consulting the cache
first. We always want to go to Git for these types of values.
2. We were not using the existing cache for unscoped entries!
In my limited testing this results in a 2-3x speedup in calls to `get &&
store`!
0 commit comments