Repository navigation
perf: reduce number of strings by 1200 - #327689
Merged
Dmitriy Vasyura (dmitrivMS) merged 5 commits intoOct 5, 2026
Merged
Dmitriy Vasyura (dmitrivMS) merged 5 commits into
Dmitriy Vasyura (dmitrivMS) merged 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Defers listener stack capture until the configured leak-warning threshold, reducing retained error strings and memory use.
Changes:
- Aligns stack capture with
LeakageMonitor.check(). - Adds threshold-boundary coverage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/vs/base/common/event.ts |
Delays stack capture until the warning threshold. |
src/vs/base/test/common/event.test.ts |
Tests stack capture below and at the threshold. |
# Conflicts: # src/vs/base/common/event.ts
Collaborator
|
Simon Siefke (@SimonSiefke) Thank you! |
Dmitriy Vasyura (dmitrivMS)
enabled auto-merge (squash)
October 5, 2026 07:00
Dmitriy Vasyura (dmitrivMS)
approved these changes
Oct 5, 2026
Giuseppe Cianci (Giuspepe)
approved these changes
Oct 5, 2026
Sandeep Somavarapu (sandy081)
approved these changes
Oct 5, 2026
Simon Siefke (SimonSiefke)
deleted the
perf/event-listener-stack-traces
branch
October 5, 2026 16:33
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
Listener leak monitoring started capturing stack traces at 20% of its warning threshold:
However,
LeakageMonitor.check()ignores every call below the full threshold:With the workbench threshold of 175, listeners 36 through 174 therefore retained unused stack strings such as:
The graph shows ca. 1200 less error strings with this change:
Other measurements*
*average of 17 runs, might not be 100% accurate