{"thread":{"id":"61234","subject":"Re: [RFC PATCH 0/3] Parallel submodule status","startedAt":"2024-03-30T16:12:11Z","lastAt":"2024-03-30T16:12:11Z","messageCount":1,"participants":["Benjamin"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"491890","messageId":"D0DB711F-8D07-42EE-BB5C-69662EFE8B13@gmail.com","threadId":"61234","inReplyTo":null,"subject":"Re: [RFC PATCH 0/3] Parallel submodule status","fromName":"Benjamin","fromEmail":"ben.knoble@gmail.com","sentAt":"2024-03-30T16:12:08Z","receivedAt":"2024-03-30T16:12:11Z","isPatch":true,"sender":{"key":"ben.knoble@gmail.com","avatar":"https://avatars.githubusercontent.com/u/22802209?v=4"},"body":"> This set tries to speed up git status (and other commands which examine the tree state) for repositories with many submodules.\n\nI built these patches on top of master from d6fd04375f (The twelfth batch, 2024-03-28), and that went smoothly. However, I used hyperfine to benchmark the changes in a repo of mine with many submodules (which I have used as a case study for the performance before [1]), and I don’t notice any change:\n\nλ hyperfine 'git status' ~c/git/git-status 'git status --ignore-submodules=all' '~/code/git/git-status --ignore-submodules=all'\nBenchmark 1: git status\n  Time (mean ± σ):     977.8 ms ±   3.4 ms    [User: 415.4 ms, System: 460.2 ms]\n  Range (min … max):   971.5 ms … 983.4 ms    10 runs\n\nBenchmark 2: /Users/Knoble/code/git/git-status\n  Time (mean ± σ):     987.0 ms ±   6.0 ms    [User: 419.5 ms, System: 461.5 ms]\n  Range (min … max):   980.5 ms … 1000.1 ms    10 runs\n\nBenchmark 3: git status --ignore-submodules=all\n  Time (mean ± σ):      29.2 ms ±   0.5 ms    [User: 8.5 ms, System: 19.1 ms]\n  Range (min … max):    27.8 ms …  30.4 ms    90 runs\n\nBenchmark 4: ~/code/git/git-status --ignore-submodules=all\n  Time (mean ± σ):      32.3 ms ±   0.6 ms    [User: 10.5 ms, System: 19.1 ms]\n  Range (min … max):    31.0 ms …  35.0 ms    81 runs\n\nSummary\n  git status --ignore-submodules=all ran\n    1.11 ± 0.03 times faster than ~/code/git/git-status --ignore-submodules=all\n   33.47 ± 0.63 times faster than git status\n   33.78 ± 0.66 times faster than /Users/Knoble/code/git/git-status\n\n\nIs there something I needed to enable to see the speedup (am I « holding it wrong »)? Or is this series not actually implementing the parallelization yet—perhaps it is a series of preparatory commits?\n\nI look forward to an implementation of this feature; searching the mailing list reveals some candidates which don’t appear to have ever made it to master [2].\n\n[1]: https://lore.kernel.org/git/CALnO6CCoXOZTsfag6yN_Ffn+H7KE-KTzm+P-GqLKnDMg8j_Qmg@mail.gmail.com/\n[2]: https://lore.kernel.org/git/20220922232947.631309-1-calvinwan@google.com/\n\n"}]}