gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Constant CPU usage while idle (ubuntu 22.04)

Open esolitos opened this issue 2 years ago • 3 comments

Problem

It seems that even when IDLE the app has a 10~20% cpu core constant usage, single open instance with a very small git repository.

I have not dig into what it is doing, but it is definitely happening constantly. :)

System Info

Description: Ubuntu 22.04.1 LTS Release: 22.04 Codename: jammy

CPU: Intel Core i7-11800H

Screenshots

image

esolitos avatar Feb 16 '24 08:02 esolitos

I'm seeing the same except that it's 95% with a large repo with a lot of legacy branches. NixOS 23.11, Ryzen 5800U.

patternseek avatar Feb 16 '24 12:02 patternseek

Thank you for reporting this. There are definitely some inefficiencies that we became aware of, and im working on fixing them one by one. Which app version did you experience this in? The past two releases (0.10.10 changelog in discord and 0.10.11 changelog in discord contain a few performance optimizations that might be relevant)

There are still some outstanding issues though, especially with repositories with many remote branches, as well as incorrect handling of LFS. If you dont mind, i will update this thread when I have a patch specifically related to handling of many branches.

krlvi avatar Feb 18 '24 21:02 krlvi

Which app version did you experience this in?

I was running 0.10.7, now upgraded to 0.10.12 and I am seeing pretty much the same situation.

FYI: I have purposely selected a small repo with very few branches to test this software and I only have a single project connected, so I should be pretty much in the bare minimum of resources usage.

esolitos avatar Feb 20 '24 14:02 esolitos

(accidental button press) ☝️

@esolitos if you have time, would you be able to try out the latest build? There are 2 optimizations that I made recently - one which makes vbranch operations more efficient, and also separately there was an issue where recomputing of state was triggered from changes to gitignored files (and as it turnes out, some editors/ IDEs like to write a bunch).

🙇

krlvi avatar Feb 26 '24 14:02 krlvi

Hi @krlvi, first of all thanks for looking into this!

I'm sorry to report that even with the most recent version (0.10.17) I still see a constant ~10% CPU usage.

Let me know if you need any detail to help you understand the source of this issue.

esolitos avatar Feb 26 '24 22:02 esolitos

Can confirm similar results. Here is the top command showing what it looks like with gitbutler 0.10.19 appimage running (the WebKitWebProcess is the browser window for gitbutler). WindowsTerminal_2024-02-29_16-36-52

Just to see if there was a possible tauri issue, I tried running the kanri appimage build which is made with tauri, and got the following result: WindowsTerminal_2024-02-29_16-44-26

KroniK907 avatar Mar 01 '24 01:03 KroniK907

Just for the heck of it I removed ALL of my repos from gitbutler and fully relaunched it (appimage), and this is what the usage looked like on the welcome setup screen: WindowsTerminal_2024-02-29_17-06-25

KroniK907 avatar Mar 01 '24 02:03 KroniK907

Just updated to 0.10.22 and I must say that this looks 100% resolved. :)

I'll go ahead and close this, thanks for the amazing work done!

esolitos avatar Mar 06 '24 08:03 esolitos