-
Notifications
You must be signed in to change notification settings - Fork 646
Visual Studio always uses significant energy when doing Go development #698
Comments
From @strrchr on December 9, 2016 14:5 I encounter the similar problem. |
From @thewhitetulip on December 10, 2016 4:55 I started using |
The Go extension isn't shy to spawn new processes, e.g., on hover, which can result in increased energy consumption. @thewhitetulip can you confirm that you only saw this problem when disabling the Go extension in the Extensions viewlet. Assigning to @ramya-rao-a for further investigation in the Go extension. I'll add the |
From @thewhitetulip on December 23, 2016 4:41 @egamma Well, I use Code only for Go programming :-) So I can't say for sure. But I will confirm by writing a python project using VScode too |
From @thewhitetulip on December 25, 2016 7:15 @egamma I am sorry for the delay, yes, writing Go code marks VSCode as using high energy, tested thrice writing JS and writing Go, JS has no issues, Go has issues. Also, thought you might want to know: Code Helper eats 11% CPU for every single edit of any file (Go or not) 92+28+26+59+23 MB is the system memory Code Helper eats even if it is idle (there are that many instances of the service) contrast that with iTerm, I had 10 tabs and a server running, still iTerm takes .4% CPU 43MB Memory Do let me know if you need more information. |
@thewhitetulip thanks for following up, I move the issue to the Go Issue repository for further investigation. |
@thewhitetulip @strrchr Did you recently upgrade to Mac OS X Sierra? There is a known issue of performance of Go tools on Mac OS X Sierra. See #503 Run the command |
It is about excess Energy being used and not CPU, I am not sure if this is the issue. I am using Sierra and will check after installing new binaries. |
@thewhitetulip @strrchr Any updates? |
@ramya-rao-a I am sorry, I was on a vacation, will reply back in 12hrs |
@ramya-rao-a on a related note, we are spawning a new process for every hover. One option would be to switch gocode for something else, another would be to implement the gocode RPC client in TS and therefore run the query from within the extension. I have to admit that I don't know the energy cost of starting a new process on Windows and Mac so I can't tell if that would even help. One thing I know, is that the battery life on my MBP 2016 is a joke and anything that would help me get more unplugged coding hours out of this machine would be welcome. |
@mattetti I have a MBP 2012, 8hrs+ battery when I don't use VSCode, I still haven't gotten time to download and test the new binaries, I would love to use VSCode if it took equal or a little bit more energy than vi. |
@thewhitetulip VSCodeGo and VimGo use basically the same tools under the hood so the difference might be with electron rendering. In my experience the CPU usage wasn't bad at all so I didn't notice anything specific to VSCode ( I switched from macvim). CPU is usually the driver or energy consumption. It would be interesting to get more metrics about where "energy" is used when you code with VSCode and if it's related to VSCode or the go extension. |
@mattetti Well, when I write Go using VSCode, then after five minutes, it pops up in "apps that use significant energy". I tried with Python, but it seems that Go extension is causing this issue. But even if this isn't the case, surely due to electron rendering vi still rocks. If you give me specific information which you require, I'd be happy to give them. I Love VSCode, but my MBP runs only for 4hrs max if I use it, I didn't buy a MBP for running it for 4hrs! I want the full 8hrs! |
@thewhitetulip Now that you see similar energy issues when the Go extension is disabled and the related issue in vscode is tracking the same, is it ok if we close this issue? The other concern about hover spawning a new shell everytime is being tracked in other issues. |
@ramya-rao-a Yes, I feel it is appropriate to close this issue since we have established that energy is being used without this extension. I must say (again), I love how you guys(MS) are handling this project, fabulous! Not in my wildest dream had I thought that MS would change the way devs write code on Linux! |
Thanks for the kind words @thewhitetulip! We will keep working on that :) Happy Coding! |
From @thewhitetulip on December 9, 2016 8:33
Steps to Reproduce:
Open any file and do some changes, open the terminal or write Go code, vscode always consumes too much energy. This is the reason I have to use some light weight editor like Geany or vi. I'd love it if vscode uses less energy than what it does now.
Copied from original issue: microsoft/vscode#16963
The text was updated successfully, but these errors were encountered: