Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently single-threaded object counting during pack generation is 3x slower than when git does it. It takes git about 52s to count the linux kernel pack by tree traversal while gitoxide takes 160s on a single thread. All this while we know that
gitoxide
's pack access performance is en-par or even faster than the one in git.Obviously there must be something here that causes this behaviour, here are a few ideas:
I think it's worth noting that
gitoxide
does seemingly a little more than counting as it records some pack information that can later be used for faster entry lookups. Thus I have trouble imagining that it's going to be any faster than this in single-threaded mode. Overall, writing a pack of 3.6GB takes around 104 seconds on an M1 MacBook Air. It took 97s with a 1GB pack lookup cache instead of 512MB (with 58.12% efficiency instead of 52%)For the same task, here is git. Note that git builds a better pack and it's Organges vs. Apples, but it's all we got a 3.10GiB pack in 137s .
Now there is one avenue left to explore:
Shortest time noe 86s for counting and 98s for everything. 44s and 50s with multi threaded counting, making it about 2.7x faster than git.
Now we are talking!