gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Entering commit message is very slow

Open LovesAsuna opened this issue 1 year ago • 2 comments

Version

0.12.17

Operating System

Mac OS X

Distribution Method

dmg (Apple Intel)

Describe the issue

It takes 1 second for a letter to be displayed after I type it.

How to reproduce

Maybe it's because the git repository is too big?The .git file is nearly 800mb

Expected behavior

No response

Relevant log output

No response

LovesAsuna avatar Aug 09 '24 13:08 LovesAsuna

Thanks a lot for reporting!

I looked into this for a moment using the gitlab repository. There I naturally managed to go way beyond 1s per character typed to the point where it was unusable. Most clicks were laggy, and it turned out to be an overwhelmed webview.

Instruments show that it's very busy here:

Screenshot 2024-08-09 at 15 37 09

And this script showed that there are ~236.000 elements in the DOM, despite the UI really not looking like it.

const countElements = document.getElementsByTagName('*').length;
console.log("Total number of elements in the DOM:", countElements);
Screenshot 2024-08-09 at 15 39 41

There are ~78.000 files in this repository, and maybe somehow these are present in the DOM?

Interestingly, the longer the UI is busy, the less CPU it consumes, it's like its slowing itself down. The virtual memory footprint was at 3.56GB and real-mem was at 120MB.

Trying to record a timeline didn't work at all - even though the button could be pressed, nothing would show. After a couple of minutes, the console of the browser window would be unresponsive and no more code could be executed, it was constantly busy and has seemingly ground itself to a halt.

Byron avatar Aug 09 '24 13:08 Byron

I am using the gitlab repository too. I even use dua to count the size of git files. hh

LovesAsuna avatar Aug 09 '24 13:08 LovesAsuna