loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
9.6k stars 349 forks source link

High CPU usage when idle #457

Open andydavies-cupa opened 1 year ago

andydavies-cupa commented 1 year ago

What happened?

I booted my machine and started DevPod. I did not start any workspaces, Docker or other programs as yet. When looking at the task manager the DevPod app is regularly consuming between 15 and 30% CPU, but it fluctuates quite wildly. Memory is also changing a lot around the 300Mb mark, power usage also hits 'very high' every few seconds.

What did you expect to happen instead? I would expect the app, once started, to sit at a much lower CPU (almost 0%), Memory and Power usage.

How can we reproduce the bug? (as minimally and precisely as possible) As far as I can tell, simply start the app on a Windows 10 OS.

Local Environment:

DevPod Provider: Didn't get that far :-(

FabianKramm commented 1 year ago

@andydavies-cupa thanks for creating this issue! Mhhh there is not really anything running in the background except DevPod doing a devpod list from time to time that should be super quick since you don't have any workspaces. Maybe the window view within the desktop app consumes some cpu, we will need to investigate this.

sashapetrovska commented 1 year ago

I second this, my CPU usage goes nuts when opening the app and doing literally nothing. I ended up uninstalling because of this.

https://github.com/loft-sh/devpod/assets/90290584/2f39a284-e9af-4fb3-9597-0979fad46bb9

FabianKramm commented 1 year ago

@SashaPetrovska thanks a lot for the video, that really helps, we will investigate this and report back if we fixed this.

s-KaiNet commented 1 year ago

I have a similar issue, however in my case the DevPod app itself doesn't produce high CPU, but for some reason forces other windows services to consume too much of the CPU.

At the beginning, my antivirus went crazy with 30-40% CPU with idled DevPod (without any containers running). I've added all possible path to exclusion, but it didn't help. Then I disabled the antivirus completely and found that, when you simply start the DevPod (no docker, nothing, just clear windows after reboot), then the below guys on the screenshot consumes 20-30% of CPU.

image

I disabled Program Compatibility Asist Service, but it didn't help a lot: image

As soon as I quite from DevPod, the situation backs to normal. As I understand State Repository Services is related to MS Edgge\WebView, looks like something wrong there, but cannot tell what. I've tried built-in feature of repairing MS Edge and Webview, restarted the PC, nothing helped.

UPD: Maybe the issue should be tracked back to Tauri?

Local Environment: DevPod Version: 0.3.0 Operating System: Windows 11 (22H2) ARCH of the OS: i386x64