Traversal Performance: Commits and trees #76
Byron
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When figuring out which objects to send during a clone (and without any caches like bitmaps/multi-pack indices) one will have to find all commits starting from given tips, whose trees need to be traversed deeply to find all objects that are present and to be sent to the receiver.
Here is how this looks like for the linux kernel.
Traversing ancestors in
gitoxide
on a hot cache is about 2.2x faster than it is inlibgit2
, interestingly it's best to not have any cache at all. Apparently commits are barely delta-compressed in a way that would help cache hits.Tree traversal on a single thread is still 1.55x faster for
gitoxide
when compared tolibgit2
. More might be possible if different caching stategies are employed. When using multiple threads and adashmap
to collect unique objects, we get a scaling factor of 3.1x which clearly shows the synchronization costs coming with the in fact excellentdashmap
implementation. It would be interesting to see scaling factors on 16 or 96 core machines.The parallel version of
libgit2
isn't yet implemented, but expected speedups are in the range of 2x maximum from prior experience.Beta Was this translation helpful? Give feedback.
All reactions