-
-
Couldn't load subscription status.
- Fork 2.3k
Description
Describe the bug
Adding a modified file so it's staged takes a long time. The logs show that the add operation is fast, but the subsequent status operation is slow due to submodules being present and queried.
To Reproduce
On Windows, open lazygit in a repo with +20 submodules. Add staged files in the main repo. The first one is always quick, but the other ones are slow. Adding/undoing adding is slow +- 4 seconds on my machine. I'm guessing the more submodules, the slower it will be.
Expected behavior
Add operations should be fast!
Version info:
commit=0d5a410114036e2151087e6a8cf5295cca317c16, build date=2025-09-06T08:19:01Z, build source=binaryRelease, version=0.55.0, os=windows, arch=amd64, git version=2.51.0.windows.2
Additional context
When I run the command in the terminal it takes a similar amount of time. I think it should be possible to ignore the submodules when running the status command immediately after staging a file. This speeds it up a lot!
SLOW: git status --untracked-files=all --porcelain -z --find-renames=50%
FAST: git status --untracked-files=all --porcelain -z --find-renames=50% --ignore-submodules=all