Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: memory leak in notebook editor widget #204892

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

SimonSiefke
Copy link
Contributor

Fixes #204756

For testing:

  • The number of new ScopedContextKeyWidgets after opening and closing a notebook editor 97 times is reduced from 194 to 0.
  • The number of leaked objects after opening and closing a notebook editor 97 times is reduced from ~10000 to ~6000

Test script (scoped context key widget count)

(replace VSCODE_PATH with path to local vscode)

git clone [email protected]:SimonSiefke/vscode-memory-leak-finder.git &&
cd vscode-memory-leak-finder &&
git checkout v5.41.0 &&
npm ci &&
VSCODE_PATH="/home/simon/.cache/repos/vscode/scripts/code.sh"  node packages/cli/bin/test.js --cwd packages/e2e  --check-leaks --measure-after --measure growing-disposable-stores --only ^notebook.open --runs 97 &&
cat .vscode-memory-leak-finder-results/growing-disposable-stores/notebook.open.json

Test script (object count)

(replace VSCODE_PATH with path to local vscode)

git clone [email protected]:SimonSiefke/vscode-memory-leak-finder.git &&
cd vscode-memory-leak-finder &&
git checkout v5.41.0 &&
npm ci &&
VSCODE_PATH="/home/simon/.cache/repos/vscode/scripts/code.sh"  node packages/cli/bin/test.js --cwd packages/e2e  --check-leaks --measure-after --measure object-count --only ^notebook.open --runs 97 &&
cat .vscode-memory-leak-finder-results/object-count/notebook.open.json

Copy link
Member

@rebornix rebornix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@vscodenpa vscodenpa added this to the February 2024 milestone Feb 12, 2024
@rebornix rebornix merged commit 1a598ff into microsoft:main Feb 12, 2024
6 checks passed
@microsoft microsoft locked and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak in notebook editor
4 participants