Fix Suggestion Widget Hanging#152011
Conversation
jrieken
left a comment
There was a problem hiding this 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
|
Thanks, @jrieken. I couldn't find any class called |
jrieken
left a comment
There was a problem hiding this 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
|
Thank you. I updated to use |
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.