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

massive slowdown from new scrollbar #5186

Open
jerch opened this issue Oct 6, 2024 · 3 comments
Open

massive slowdown from new scrollbar #5186

jerch opened this issue Oct 6, 2024 · 3 comments
Labels
area/performance type/bug Something is misbehaving type/debt Technical debt that could slow us down in the long run

Comments

@jerch
Copy link
Member

jerch commented Oct 6, 2024

Repro:

  • run ls -lR /usr in demo
  • move mouse off the terminal widget while the output flows

--> massive slowdown with high CPU usage, seems to be caused by tons of setTimeout/clearTimeout calls

image

@jerch jerch added type/bug Something is misbehaving type/debt Technical debt that could slow us down in the long run area/performance important labels Oct 6, 2024
@Tyriar
Copy link
Member

Tyriar commented Oct 7, 2024

@jerch timeouts are actually massively inflated in devtools so can't be trusted in a profile. This isn't actually a problem.

Back when we could use the JavaScript profiler tab in devtools this could be verified as all the overhead involved in the performance tab could be removed, but they removed this from Chromium unfortunately.

@Tyriar Tyriar closed this as completed Oct 7, 2024
@Tyriar
Copy link
Member

Tyriar commented Oct 7, 2024

Having said that, we could add some debouncing or something to the onDidScroll event which would make the profiles much less noisy. Ideally I think a single event per task would run a microtask.

@Tyriar Tyriar reopened this Oct 7, 2024
@Tyriar Tyriar removed the important label Oct 7, 2024
@jerch
Copy link
Member Author

jerch commented Oct 7, 2024

@jerch timeouts are actually massively inflated in devtools so can't be trusted in a profile. This isn't actually a problem.

Oh well, wasn't aware that setTimeout/clearTimeout are that toxic in the profiler. Its prolly the same with my other comment here --> #5176 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance type/bug Something is misbehaving type/debt Technical debt that could slow us down in the long run
Projects
None yet
Development

No branches or pull requests

2 participants