{{ message }}
Repository navigation
fix: memory leak in suggest enabled input - #340913
Merged
Dmitriy Vasyura (dmitrivMS) merged 8 commits intoOct 14, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 8 commits into
Dmitriy Vasyura (dmitrivMS) merged 8 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Scheme-less Keybindings Editor inputs lose completion support under the new selector.
1 open finding
What changed in this PR
Removes per-input glob selectors from SuggestEnabledInput to prevent glob-cache memory growth.
Changes:
- Registers completion providers by URI scheme and validates exact model URIs.
- Adds coverage for matching and nonmatching resources.
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Dmitriy Vasyura (dmitrivMS)
requested changes
Oct 13, 2026
Dmitriy Vasyura (dmitrivMS)
left a comment
Collaborator
There was a problem hiding this comment.
Please consider review comment
Contributor
Author
|
Addressed feedback. I don't think that can apply in practice. |
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 14, 2026
Collaborator
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
October 14, 2026 08:55
Aiday Marlen Kyzy (aiday-mar)
approved these changes
Oct 14, 2026
Alex Ross (alexr00)
approved these changes
Oct 14, 2026
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
SuggestEnabledInputgives each embedded editor a unique synthetic model URI and registers a completion provider with a**/<path>selector. Language-selector scoring compiles each unique path through the global glob cache.The Settings Editor lifecycle test opens, searches, switches scopes, and closes the editor 37 times. It produced 37 new
isEqualOrParentclosures, 37parsedPatternclosures, and 37 copies of each of the two anonymous option closures. Heap paths end in the glob cache with keys such asdefault:**/searchinput12_false_false.Change
Register the provider for the synthetic URI scheme and reject models whose URI does not exactly match the input model. This preserves completion behavior for the intended input without creating a per-input glob cache entry. A browser test checks both the matching input model and another model with the same scheme.
Before
After 37 Settings Editor lifecycle cycles, all four glob-related closure families grew by 37.
After
The four glob-related rows are absent after the same 37 cycles. The remaining
ScopedMementorow comes from independent modal-editor memento growth and is being handled separately.Test Video
The video shows three candidate cycles opening Settings, searching, switching between Workspace and User scopes, and closing the editor.
settings-editor-lifecycle.webm