-
-
Notifications
You must be signed in to change notification settings - Fork 330
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
Inconsistent gix status performance with clean trees #1771
Comments
Thanks for checking! Which platform was that on? I thought it Linux is more sensitive to regressing with whatever My feeling is that this might be related to tuning thread-counts better, but thus far I didn't yet get to dig into this. |
That test was run natively on macOS (m1) to take advantage of hyperfine. zsh-bench with the docker runner on the same machine runs at with |
A reason it is so much slower for clean repos is that there is logic to exit early in the case of changes. If I make a change to a top level file in the linux repo
The rest of the threads complete in ~500ms for me, I hid them to make the screenshot smaller |
Thanks so much for profiling this, that's very helpful! And I think it makes sense that this is the cause of the slowdown, because it's part of the tree-index comparison that was recently added, and before that these performance slowdowns weren't known. It's a single-threaded tree-traversal that is used to create an index from the However, no matter what, On cold cache, it appears the IO needed to access loose objects and packs on top of traversing the directory and statting all files is causing huge slowdowns. The best I can imagine doing is to run the tree-index comparison sequentially. The code for that is here, but it's not super trivial to make it sequential, even though it's probably OK to 'hack' it just to get an idea of the performance implications of sequentially running this part. The question here is if these slowdowns go away once the parallelism is reduced. Something else that could be done is to use |
Discussed in #1767
Originally posted by eatradish January 14, 2025
Hi all, I have written a git status plugin for Bash called bash-git-status, which previously leveraged git-status to detect and prompt users about a Git repository's status:
Now that gix status is ready, I followed starship#6476 to re-implement this function in hope of better performance. You may find the current implementation here:
AOSC-Dev/bash-git-status#1
However, I found that the performance improvements, while significant, is not consistently found in all cases. For instance, in a "clean" (unchanged) aosc-os-abbs copy, I observed an 1.3x improvement in response time; however, in a "clean" linux copy, the reponse time worsened by about 5x.
The benchmark results are as follows, using
linux
get 5x slower withunchanged
oruntracked
:changed:
Test Enviromment:
The text was updated successfully, but these errors were encountered: