-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
I noticed that VS Code is re-creating hover DOM elements every time a user's mouse moves even a pixel, and even if the hover content is exactly the same.
I've created a short PR to check for equal contents before disposing and re-creating the document fragment: #29387
To illustrate the difference, I added a console.log whenever the ModesContentHoverWidget._renderMessages method is called.
See a video of how it behaves currently: https://cl.ly/2X2k0O1Z370q
And a video of how it behaves with my PR: https://cl.ly/0I15253M142X
Note: this change is currently live on Sourcegraph (e.g. https://sourcegraph.com/github.com/Microsoft/vscode/-/blob/src/vs/workbench/electron-browser/workbench.ts#L148-149)