-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Files panel is empty when (many) new/changed files exist #3798
Comments
Before we do that, we should see if it's possible to optimize the code so that it doesn't take so long. There's really no reason why it should take several seconds to populate the files panel with a few thousand files. A cursory profiling shows that almost all the time is spent inside the |
Can I take a loot at it? |
Great. In my testing repository "manylazyfiles" where it took 9 seconds it now takes fraction of a second (I would say 0.3). Me and my colleague also enjoy your approach - simply optimizing the process without introducing complexities with "loading ...". Well done. |
Describe the bug
While git status shows that changed/new files exist, lazygit panel "Files" panel is empty.
This happens when number of new/changed files is really large (e.g. 90 thousands) - lazygit is aware of their existence but it takes 9 seconds (on my MacBook Pro M1) until anything is printed into Files panel. Until then, user feels like lazygit ignores the changes as there is no sign, lazygit is still trying to show somehting.
To Reproduce
Steps to reproduce the behavior:
mkdir data seq 90000 |xargs -I {} touch data/file-{}.txt
The panel is empty and lazygit seems ignoring the newly created files until like 9 seconds and then the files are shown properly.
Typical developer will give up after few seconds closing lazygit with unfair remark "ignorant".
Expected behavior
lazygit would print initially "Reading files..." into Files panel and would then replace it with whatever final result would finally get there.
This could happen always or (optimized variant) only if the content of the panel is not populated within a second.
Screenshots
Initial presentation with empty Files (during rendering large number of new items):
And after cca 9 seconds the files are finally shown:
Version info:
The text was updated successfully, but these errors were encountered: