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

[perf] Investigate TerminalLinkDetector#_parseWords performance #169867

Closed
jrieken opened this issue Dec 22, 2022 · 5 comments · Fixed by #169889 or #173050
Closed

[perf] Investigate TerminalLinkDetector#_parseWords performance #169867

jrieken opened this issue Dec 22, 2022 · 5 comments · Fixed by #169889 or #173050
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues insiders-released Patch has been released in VS Code Insiders terminal-links verified Verification succeeded
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Dec 22, 2022

re #170954

Automatic renderer profiling points towards _parseWords as being a cause for freezes. For 1.75.0-insiders we are seeing ~50 reports where this function was running for 350-500ms

This is a trace from todays insiders

c#workbench.desktop.main.js:1120,20208
detect#workbench.desktop.main.js:1120,19514
<h#workbench.desktop.main.js:1092,7040
<provideLinks#workbench.desktop.main.js:1092,6962
<_askForLink#xterm.js:1,11082
<(anonymous)#xterm.js:1,15056
<fire#xterm.js:1,136295
<_renderRows#xterm.js:1,99952
<(anonymous)#xterm.js:1,97951
<_innerRefresh#xterm.js:1,19939
<(anonymous)#xterm.js:1,19898
@jrieken jrieken added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Dec 22, 2022
@Tyriar Tyriar added this to the January 2023 milestone Dec 22, 2022
@Tyriar Tyriar added bug Issue identified by VS Code Team member as probable bug terminal-links labels Dec 22, 2022
@Tyriar
Copy link
Member

Tyriar commented Dec 23, 2022

Struggling a bit with a repro. I managed to repro it with some pretty unrealistic circumstances:

image

The above was made by adding this setting:

"terminal.integrated.wordSeparators": " ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’ ()[]{}',\"`─‘’"

Then mousing over this (cat long file and zoom out the workbench):

image

I'll optimize against this and hope it goes away in telemetry.

Tyriar added a commit that referenced this issue Dec 23, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Dec 27, 2022
@jrieken
Copy link
Member Author

jrieken commented Jan 27, 2023

Verifying these perf-issues is really hard - automatic stack trace profiling has more in common with error telemetry than traditional bugs.

@Tyriar Tho, having said that I did look into the code and do I believe looping over a string to find word-gap characters isn't the fastest option. I didn't measure and it is counter intuitive but I am very certain the using a String#split with a regex is faster.

@Tyriar
Copy link
Member

Tyriar commented Jan 27, 2023

@jrieken TIL you could split using a regex 🤯. It was quite fast based on my testing when I did the PR, the reason I didn't try a regex approach as regex escaping a user-defined string seems error prone.

@jrieken
Copy link
Member Author

jrieken commented Jan 27, 2023

escapeRegExpCharacters might help with handling user-defined strings. This should be measured but I remember we have been floored by the regexp performance a couple of times - it makes sense when you consider JS/native context switches

@Tyriar
Copy link
Member

Tyriar commented Jan 27, 2023

Handy, will reopen for next milestone

@Tyriar Tyriar reopened this Jan 27, 2023
@Tyriar Tyriar modified the milestones: January 2023, February 2023 Jan 27, 2023
@VSCodeTriageBot VSCodeTriageBot removed the insiders-released Patch has been released in VS Code Insiders label Jan 27, 2023
@Tyriar Tyriar closed this as completed in b188275 Feb 1, 2023
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Feb 1, 2023
@jrieken jrieken added the verified Verification succeeded label Feb 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues insiders-released Patch has been released in VS Code Insiders terminal-links verified Verification succeeded
Projects
None yet
3 participants