Repository navigation
fix: memory leak in keybindings search - #346268
Merged
Ulugbek Abdullaev (ulugbekna) merged 1 commit intoNov 7, 2026
Merged
Ulugbek Abdullaev (ulugbekna) merged 1 commit into
Ulugbek Abdullaev (ulugbekna) merged 1 commit into
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Raymond Zhao (@rzhao271)Matched files:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change removing unused storage of unmatched Keyboard Shortcuts searches.
No open issues 🎉
What changed in this PR
Fixes unnecessary memory retention in the Keyboard Shortcuts editor by removing unused storage of searches that return no matches.
Changes:
- Removes the
latestEmptyFiltersarray. - Removes the append operation that retained unmatched queries for the pooled editor’s lifetime.
| File | Description |
|---|---|
src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts |
Removes unused query storage without changing search results or search history. |
Review effort: Balanced
Ulugbek Abdullaev (ulugbekna)
approved these changes
Nov 6, 2026
Ulugbek Abdullaev (ulugbekna)
enabled auto-merge (squash)
November 6, 2026 11:07
Ulugbek Abdullaev (ulugbekna)
disabled auto-merge
November 6, 2026 11:08
Ulugbek Abdullaev (ulugbekna)
enabled auto-merge (rebase)
November 6, 2026 11:08
Federico Brancasi (federicobrancasi)
approved these changes
Nov 6, 2026
Christof Marti (chrmarti)
approved these changes
Nov 6, 2026
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Ulugbek Abdullaev (ulugbekna)
merged commit Nov 7, 2026
4f1cd9d
into
microsoft:main
59 checks passed
Simon Siefke (SimonSiefke)
deleted the
fix/memory-leak-keybindings-search
branch
November 11, 2026 10:35
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.
Details
Every keyboard-shortcut search with no matches appends its text to
latestEmptyFilters. The pooled editor keeps that array after search history is cleared and the editor closes, although the array is never read.Change
Remove the unused query array and its append operation.
Before
Searching for 17 different missing command IDs, clearing search history and closing Keyboard Shortcuts after each search grows the unused array from 3 to 37 entries. Total string growth is 6,648 bytes/173 strings.
After
Old queries no longer accumulate; their string growth falls from 1,156 bytes to zero. Only the latest query remains in search history. Total string growth is 5,392 bytes/139 strings; other growth remains.
Test Video
Keybindings-search.webm
AI disclosure: Model: GPT 6.1 Sol. Worktime: 22 min