-
Notifications
You must be signed in to change notification settings - Fork 645
High CPU usage resulting from frequent godef invocations via HoverProvider #257
Comments
A good workaround for me would be for hover to be disabled entirely unless I'm holding down a certain key (e.g. ⌘). I've been searching and can't yet find any way to accomplish it. |
I was experimenting with disabling This means calls to I'm not yet seeing a way to configure the hover modifier key in VSCode. |
Looks like microsoft/vscode#3130 tracks the capability to change the peek definition modifier. |
Thanks for the investigation on this @ironcladlou. I haven't actually seen anything nearly as severe as you mention myself. I'm a bit surprised that you would seen Electron Helper CPU going up due to spawning What may be a problem is the recent change to also invoke As for the number of As for removing the hover and cmd+hover behaviors by default - that's something VS Code can offer, but it shouldn't be the case that users feel they need to do that for performance reasons. I'll leave this open to track improving the CPU performance of extrainfo and gotodefinition, since I believe that's the root cause here. |
I do see Disabling the HoverProvider was the big win for me personally. Although I do agree that the default hover behaviors should be able to remain on by default and any underlying performance issues resolved, I filed some upstream issues for configuration nonetheless because I'd like the ability to make any popup behavior totally modifier driven (as a means to eliminate distractions). The performance issues are separate. |
A fix that should address the CPU issue is in |
I'm still seeing this issue on 0.6.35. Basically any time I type a . (dot/period) in VSCode, all of my CPUs (both physical and hyperthreading) go immediately to 100% usage, causing my system to slow to a crawl until it's complete. This is VSCode 0.10.8 running on Fedora Workstation 24 against the following settings:
|
That sounds like a different issue, since it's not related to hovering or Instead, it sounds like it's going to be an issue with https://github.com/nsf/gocode - possibly related to turning on |
@lukehoban Actually, it looks to be the same issue as #252 (I'm actually working on the same project, OpenShift Origin). I'll take this discussion to that ticket. |
I just started having godef procs spawn and hammer the CPU on mac. 6 procs at 30% each, even after I closed vs code :( |
Fixed my issue with |
Thanks for the update @sethgrid |
Hi Ramya, Go: Install/Update tools is not fixing my issue on vscode version Version 1.19.2 (1.19.2) Mac. go version go1.9.2 darwin/amd64 |
@rajatdeshpande This issue is very old and the code behind the Go extension and VS Code has long since changed a lot. Please log a new issue with detailed description of the issue you are seeing |
Any travel of the mouse over the editor region causes
godef
to be invoked almost continuously. Usingtop -a -o cpu -n 10
on OS X, Electron goes wild any time the mouse is moving. Watching the console with some debug logging in the GoHoverProvider revealed a surprising number of godef calls. It's very easy to get my current model 15" rMBP's jet engines roaring just by moving the cursor around for a few seconds.The severity of this issue is seems pretty subjective. Apparently the way I use the trackpad while coding tends to make the current hover responsiveness and design problematic.
I like the hover feature and so am interested in how to make it more CPU efficient.
The text was updated successfully, but these errors were encountered: