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

Custom Hover in REPL freezes the UI #210518

Closed
rebornix opened this issue Apr 16, 2024 · 11 comments
Closed

Custom Hover in REPL freezes the UI #210518

rebornix opened this issue Apr 16, 2024 · 11 comments
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues important Issue identified as high-priority workbench-hover Hover issues in the workbench

Comments

@rebornix
Copy link
Member

Does this issue occur when all extensions are disabled?: Yes/No

I ran into this pretty often while debugging extensions

image

and digging into the call stack, it's coming from custom hover handler for REPL

image
@rebornix rebornix added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Apr 16, 2024
@Tyriar
Copy link
Member

Tyriar commented Apr 16, 2024

Guessing this is a consequence of using the more convenient but less performance-conscioussetupUpdatableHover?

@Tyriar Tyriar added the workbench-hover Hover issues in the workbench label Apr 16, 2024
@rebornix rebornix added the important Issue identified as high-priority label Apr 17, 2024
@rebornix
Copy link
Member Author

adding important as currently VS Code is barely usable while debugging Copilot.

@Tyriar
Copy link
Member

Tyriar commented Apr 17, 2024

+@aiday-mar was this change part of the hover enriching work you did? I think when using hovers extensively like this you need to move off setupUpdatableHover and manage things yourself via IHoverService.showHover

@aiday-mar
Copy link
Contributor

aiday-mar commented Apr 17, 2024

Hi @Tyriar probably not, the hover enriching work is not merged yet. I have done some refactoring on the content hover however so if there is a link somewhere to the content hover code it could be caused by that.

@benibenj
Copy link
Contributor

benibenj commented Apr 17, 2024

This might be the culprit if the problem is hover related: #209058
Here is where the hover is being setup. But I don't really see a problem with this call.

@connor4312 Do you think this is actually hover related? It looks like there are a lot of renderElement calls. If 20 items are visible and the hover setup takes around 5ms then this would account for "only" 100ms of the 5s shown in the trace.

@Tyriar
Copy link
Member

Tyriar commented Apr 17, 2024

Hover does seem like the majority but linkify is also awfully expensive there 🤔

@connor4312
Copy link
Member

I assume this happens when a breakpoint gets hit, do you recall where you placed that breakpoint when you got that profile @rebornix?

@rebornix
Copy link
Member Author

@connor4312 I used breakpoints briefly while debugging, but I can' recall if they were still enabled when I did the profile.

@connor4312
Copy link
Member

Do you know in general what you were doing so I can try to reproduce? I don't think I've hit this before in my debugging.

The only slowness I get in the copilot repo is when dealing with source map renames making the initial 'variables' view slow to load (TBD whether there's much I can to do speed that up) but that's not renderer-blocking.

@rebornix
Copy link
Member Author

Coming back a bit late. I don't really have a good reproduce.

@connor4312
Copy link
Member

Fixed in microsoft/vscode-js-debug#2000

@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
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues important Issue identified as high-priority workbench-hover Hover issues in the workbench
Projects
None yet
Development

No branches or pull requests

5 participants