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 Suggestion Widget Hanging #152011

Merged
merged 4 commits into from Jul 5, 2022
Merged

Fix Suggestion Widget Hanging #152011

merged 4 commits into from Jul 5, 2022

Conversation

ssigwart
Copy link
Contributor

@ssigwart ssigwart commented Jun 14, 2022

This PR fixes #152010

To test, see the steps to reproduce in #152010. Running that test before and after should be a noticeable different. On my 2014 Macbook Pro, it's around 30 seconds vs ~2 seconds.

Copy link
Member

@jrieken jrieken left a comment

Thanks @ssigwart. This is a nice issue and good investigation. You are on the right path to fix this but I would go "one level deeper" See #152010 (comment) - all consumers are affected by this (hover, suggest, ghost text) and I would use the DebounceEventEmitter for this event onDidRenderAsync. That's the same approach as yours but at the source

@ssigwart
Copy link
Contributor Author

@ssigwart ssigwart commented Jul 2, 2022

Thanks, @jrieken. I couldn't find any class called DebounceEventEmitter, but I'm guessing you just meant to apply the Event.debounce change to markdownRenderer.ts, so I did that.

Copy link
Member

@jrieken jrieken left a comment

Sorry, I meant DebounceEmitter. You can also use Event.debounce but there is disclaimer about leakage when using the debounce-util to create a "public" event. In short, in this case it is best to use the DebounceEmitter

@jrieken jrieken added this to the July 2022 milestone Jul 4, 2022
@ssigwart
Copy link
Contributor Author

@ssigwart ssigwart commented Jul 5, 2022

Thank you. I updated to use DebounceEmitter.

jrieken
jrieken approved these changes Jul 5, 2022
@jrieken jrieken merged commit 648bcd1 into microsoft:main Jul 5, 2022
8 checks passed
@ssigwart ssigwart deleted the markdownHang branch Jul 7, 2022
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.

3 participants