microsoft / microsoft/vscode

Add caching mechanism to DefaultsOnlyConfigurationService for default values

Open
#333,358 4 comments 0 reactions 1 assignee Claimed by @sandy081 View on GitHub
info-needed
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Feature Description
To improve performance and reduce redundant lookups on the global configuration registry, we can introduce a simple Map-based caching mechanism inside `DefaultsOnlyConfigurationService`.

## Proposed Changes
- Added a private `_defaultValueCache = new Map()` property.
- Created a `_getCachedDefaultValue` helper method to store and retrieve default values efficiently.
- Updated `getConfig`, `inspectConfig`, and `getExperimentBasedConfig` to utilize the cached default values.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.