-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
For large repositories with a significant number of changes the time it takes from selecting a file in the file view to the diff being displayed in the main view can take a long time (in my case 20 seconds or more) accompanied by the 'loading...' message in the main view. This especially seems to be true if the selection is moved through directories.
To Reproduce
Steps to reproduce the behavior:
- Open a large repository with a large number of changed files.
- Move the file selection in the file view through files/directories.
- Observe how long it takes until the corresponding diff is displayed.
Expected behavior
The expected behavior is the one observed up to v0.53: Moving the file selection resulted in a very prompt update of the diff in the main view if a file was selected. If a directory was selected it could take some time while the 'loading...' message was displayed until the diff was displayed. But even then moving the selection to a file while the 'loading...' message was displayed resulted in a prompt update.
Version info:
commit=c08903e3adabcf00d910e0107c1f675af958a70e, build date=2025-08-06T11:35:17Z, build source=binaryRelease, version=0.54.1, os=linux, arch=amd64, git version=2.43.7
git version 2.43.7
Additional context
I first observed this behavior in version v0.54 but it also occurs in v0.54.1.
I assume it might be related to the patch #4782.
The issue seems to be intensified by lazygit's functionality of aggregating diffs of files if the directory containing those files is selected.
The fact that displaying the diff for directories might already have taken some time in earlier versions did not bother me that much because diffing single files still was fast.
The behavior now that diffing single files might be delayed a lot is rather inhibiting.