59 karma · joined Feb 27, 2018 (8y ago) · 18 submissions
comment 3y ago · link · parent
comment 3y ago · link · parent
I couldn't resist and threw `gitoxide` at it, and it turned out to be more than 2x as fast (even though it uses way more CPU to do that, there is definitely room for improvement).
The PR which adds the `db-gen` program: https://github.com/jmforsythe/Git-Heat-Map/pull/6
comment 4y ago · link · parent
That said, here is how to receive a pack from the remote and resolve it: `mkdir out && gix -v no-repo pack receive https://github.com/Byron/gitoxide out`.
comment 4y ago · link · parent
comment 4y ago · link · parent
From my experience and measurements as the author of `gitoxide` both the parsing of commits as well as the binary search to find the object are negligible costs here. The majority of the time is spent in `zlib` which has to inflate objects and deltas prior to use. This makes me wonder what `zstd` would do to these kinds of workloads.
In any case, the object database decoding performance is the bottleneck when traversing commits, and one can expect to get about 120000 commits per second on the linux kernel pack on a modern CPU core like M1 with `gitoxide`s implementation.
Besides that, I find the explanation of the commit-graph file interesting and how it relates to commit-graph queries. There is so much to learn, and so much still to implement :).
6.
Check out the Linux kernel in less than a second with gitoxide(github.com ↗)
2 points · by ByronBates · 4y ago · discuss
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
The same applies when checking for changes on disk - right now git does not do that in parallel. These are low hanging fruit that I plan to pick for my own sake.
There is another contributor who is very interested in increasing pack performance, which will directly impact fetch and pull speeds. Judging from my experience with packs thus far, I believe a lot of options are still to be tapped in that field as well. Rust will open it up for contributions and experiments to a greater audience, so I would hope that this will go way beyond of what I can do.
Even though this project is not very contributor friendly right now, I will be working on improving this so more people can join in (see https://github.com/Byron/gitoxide/issues/8).
comment 6y ago · link · parent
comment 6y ago · link · parent
Please note that everything I name can certainly be fixed by some tool that already exists, and that's great. It's just that I would like to have 'this one tool' that gets most things right and be happy with it alone.
That said, here is my list:
* adding individual files to the staging area/index
* looking at the commit history and copying individual commit hashes
* pulling while assuring no merge commit is created, or: simplified trunk-based development
* resumable clones
* seeing what's going on during all remote operations - here in China GitHub is incredibly slow most of the time and connections can be flaky
comment 6y ago · link · parent
It is my hope that the quality and stability will be high enough to convince people [in the Rust ecosystem] to move away from libgit2 and instead contribute to the maintenance and development of gitoxide, rewarding everyone with better performance and improved usability.
comment 6y ago · link · parent
comment 6y ago · link · parent
Actual numbers for what's there, pack access and traversal, can be found here: https://github.com/Byron/gitoxide/issues/1 and here: https://github.com/Byron/gitoxide/issues/5
comment 6y ago · link · parent
(proof: https://keybase.io/byronbates)
comment 7y ago · link · parent
hyperfine './target/release/hexyl ./target/release/hexyl' 'xxd ./target/release/hexyl' 'hexdump ./target/release/hexyl'
Benchmark #1: ./target/release/hexyl ./target/release/hexyl
Time (mean ± σ): 1.529 s ± 0.028 s [User: 1.476 s, System: 0.050 s]
Range (min … max): 1.491 s … 1.581 s 10 runs
Benchmark #2: xxd ./target/release/hexyl
Time (mean ± σ): 70.5 ms ± 0.5 ms [User: 68.0 ms, System: 1.2 ms]
Range (min … max): 69.5 ms … 72.3 ms 41 runs
Benchmark #3: hexdump ./target/release/hexyl
Time (mean ± σ): 262.4 ms ± 2.8 ms [User: 260.1 ms, System: 1.5 ms]
Range (min … max): 259.8 ms … 268.8 ms 11 runs
Summary
'xxd ./target/release/hexyl' ran
3.72 ± 0.05 times faster than 'hexdump ./target/release/hexyl'
21.70 ± 0.43 times faster than './target/release/hexyl ./target/release/hexyl'
Currently hexyl seems nearly 22x slower than xxd.