-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
Visual Studio always uses significant energy #16963
Comments
I encounter the similar problem. |
I started using |
//cc @egamma |
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 |
@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 |
@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. |
This issue was moved to microsoft/vscode-go#698 |
I am now editing a markdown book and VSCode is taking significant energy, I do not think it is because of the Go extension. @egamma @ramya-rao-a I just have the welcome screen on, not even a single document opened. I just updated every extension and the Go plugin's dependencies. |
Reopening the issue @thewhitetulip do you still observe the high energy consumption when you disable the extensions? To disable an extension pls see this doc |
@egamma I disabled all extensions permanently, I have my mac connected to wifi and Vscode is "using significant energy" CPU consumed varies between 9% to 12% without extensions of any kind, with split window, one of markdown and another of a 100line python program 5 processes costing me 240MB RAM @ramya-rao-a |
@bpasero thoughts? |
Maybe worth checking if a process is running with high CPU in that setup. To find out more about this issue, we need to get at the process that is causing the high load. VS Code creates multiple processes, each with different tasks. Depending on your OS you can get at the full command line of the process and paste it here. On Mac, the Activity Monitor allows to find the On Windows a tool like Process Explorer helps: Once you have the information please update this issue with it. Thanks! |
I will do that, I would just like to know that am I the only one who is getting "significant energy usage"? I mean is there an issue with my mac(some weird local thing)? |
@thewhitetulip we had some energy issues in the past, but most of them are closed by now. |
@egamma Yes, it takes somewhat CPU |
@thewhitetulip is there a constant 21.7% hit on the process or only when you type? |
After reading through that other issue thread, running code with Now the thing is how to figure out which one(s) are the culprit. It seems like this problem of runaway extensions is a common enough issue, perhaps a faq or documentation entry is in order. Maybe even a tool in vscode to tell which extensions are misbehaving? |
@chuckdries You mentioned
as well as
If both statements are true, then disabling extensions manually and running code with --disable-extensions are giving you 2 separate results. Can you confirm? |
Indeed I did, though I did notice that the runaway background processes stayed open after I quit VScode, I had to manually kill them. Perhaps they accounted for my initial assessment of disabling extensions not working.
|
I'm having issues with this as well on a Mid-2010 MacBook Pro (which can switch between Intel HD Graphics and a NVIDIA GeForce GT 330M). I launched code from the command line via code --disable-extensions --disable-gpu and it doesn't use much energy when in idle (jumping between What exactly is the
I know that Electron is based on Chromium and I'm quite sure that will already enable the high performance GPU on my Macbook (at least Chrome always needs it). Just might be helpful to have an info about what exactly that flag does, as I was expecting it to prevent using the high perf GPU for me. Edit: Other Electron Apps like Slack, Atom and Whatsapp also need the high perf GPU. |
This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our guidelines for filing issues. Thank you for your contributions. |
@ramya-rao-a how did the bot close it? 😮 |
The bot closes issues with the label "needs-more-info" if there has been no additional info provided in the past 7 days. I just went through the whole thread and here is the summary:
|
@ramya-rao-a Someone else posted a profile of their VSCode that is why I did not! Give me some time, I'll comment it as soon as I can. |
@cvburgess Please log a new issue. Read through Performance Issues to see what you can share with us to help with your problem |
Well, vscode is unusable on battery because of code helper cpu usage even after vscode is fully closed. Multiple code helpers can still stay running after that and eat away your battery with high cpu usage. The problem seems to be extension quality and integration into vscode or lack of. Every time an extension crashes (and you mostly don't know since there is absolutely no message or alert, you just notice that something doesn't work) code helpers go crazy. It's back to atom for me. Although it's slower it works without any annoying problems for me and my needs. |
Yep, I can confirm that VSCode really sucks out the battery ... :( I have quite some extensions installed, so it'll be hard to find out which ones cause the major problems... what can we do? |
@smxsm Read through Performance Issues to see what you can share with us to help with your problem |
Hi @ramya-rao-a thanks for the performance debugging info - since I saw some indications in my status bar that the PHPCS extension was constantly checking files and I also saw in my process list that a LiveShare process was consuming lots of CPU I have disabled both extensions yesterday and now I am down from 80-90% battery usage for VSCode to approx. 20% :) I see if I can do some profiling later for the PHPCS extension. |
I am closing this issue and ask to file individual issues to act on. Thanks for understanding. |
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.
The text was updated successfully, but these errors were encountered: