Repository navigation
perf: reduce memory usage by 24 kB - #342397
Merged
Martin Aeschlimann (aeschli) merged 3 commits intoNov 5, 2026
Merged
Martin Aeschlimann (aeschli) merged 3 commits into
Martin Aeschlimann (aeschli) merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow change preserves schema content, and no actionable findings remain.
No open issues 🎉
What changed in this PR
Reduces theme-color registry memory usage by sharing the identical default-color schema across registered colors.
Changes:
- Creates one default-color schema per registry.
- Reuses it during color registration without changing schema content.
| File | Description |
|---|---|
| src/vs/platform/theme/common/colorUtils.ts | Shares the default-color schema instead of allocating it per color. |
Review effort: Balanced
Martin Aeschlimann (aeschli)
approved these changes
Nov 3, 2026
Federico Brancasi (federicobrancasi)
approved these changes
Nov 3, 2026
Connor Peet (connor4312)
approved these changes
Nov 3, 2026
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Share the default-color schema object across registered theme colors so each color no longer keeps its own identical copy. In a test that opened and closed an editor once, this removed 993 duplicate objects, saving 23.3 KiB of renderer memory.
AI disclosure: Model: gpt-6.1-sol. Worktime: 1 min