"Show log" on a repo with 200k files is extremely slow due to each file attributes being queried individually
What steps will reproduce the problem?
- Clone and checkout a repo with 200k+ files like https://github.com/chromium/chromium
- Invoke TortoiseGit's Show log
What is the expected output?
The log is shown immediately
What do you see instead?
The log is shown after 1-10 minutes depending on the drive speed, SysInternals ProcMon shows TortoiseGit performs attribute query for each of 200k+ files individually instead of bulk reading the directories entirely, which should happen, if I remember correctly, when using FindFirstFile WINAPI (or whatever method other programs are using, for which ProcMon shows that only a single actual IO operation was performed on the directory itself).
What version of TortoiseGit and Git are you using? On what operating system?
TortoiseGit 18.104.22.168 x64
git 2.10.0 x64 from https://git-for-windows.github.io/ Windows 7 SP1 x64
Please provide any additional information below.
Switching to the fast reading of directories won't be sufficient to make Show log instantaneous though. Apparently, the files are being checked to show their status/icons in "Working tree changes". However, I see no need to check the entire source directory recursively in a blocking fashion preemptively. Why not do it in a background thread? Or don't do it at all until the user wants to see "Working tree changes"?