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: limit decorations to prevent editor slowdown #590

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Jan 10, 2025

Closes microsoft/playwright#34248

Updating decorations slows down the editor when the number of decorations is too high. We can work around it by limiting the number of decorations.

@Skn0tt Skn0tt requested a review from dgozman January 10, 2025 11:08
@Skn0tt Skn0tt self-assigned this Jan 10, 2025
@Skn0tt
Copy link
Member Author

Skn0tt commented Jan 10, 2025

Seems to be a known problem: microsoft/vscode#202154

@@ -687,6 +687,9 @@ export class Extension implements RunHooks {
}
});
}

if (completedDecorations.length > 1000) // too many decorations slow down the editor
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps a 100? I can't imagine anyone reading more than five :)

Copy link
Member Author

Choose a reason for hiding this comment

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

This limit is per-file, so 100 will be used up quickly. And we don't know which ones the user wants to read. So i'd stay high enough that we only prevent the performance bottleneck, and nothing else.

@Skn0tt Skn0tt merged commit 179f19d into microsoft:main Jan 13, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Disable time shown for each line of execution
2 participants