mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-17 17:55:29 +00:00
606eefa8c4
This is fast enough to be used on medium-sized repositories such as git/git. It is a bit slow, but bearable, on huge repositories such as torvalds/linux. There is 0 performance penalty if the display of unique prefixes is disabled A trie-based implementation will be submitted for consideration in a follow-up PR. It is faster, but more complicated. **Update:** I also just discovered https://sapling-scm.com/docs/internals/indexedlog/ There are three important aspects of performance that seemed relevant: 1. Speed of computing the shortest unique prefix per id. It is worlds faster than the naive implementation before this commit. It can be optimized furher by using a trie or maybe the `fst` crate. 2. Speed of inital loading of the index that happens before the first commit is shown. This is the part that's noticeable but bearable on torvalds/linux. This could be optimized by storing a sorted list of commit and change ids on disk. This would likely involve reworking the `Index`. Failing that, the speed of inital loading doesn't change if a trie is used and would likely be worse with the `fst` crate 3. Memory use is unremarkable here. I don't have good tools to measure it precisely, but it does not balloon to gigabytes even on the linux repo. |
||
---|---|---|
.. | ||
gen-protos | ||
src | ||
tests | ||
testutils | ||
build.rs | ||
Cargo.toml |