Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revset: avoid merging whole parent trees by file()/diff_contains() query
Perhaps, we should also cache merged trees, but this patch saves time until we implement the bookkeeping. Even if we had a cache, it wouldn't be ideal to calculate uncached merged trees during revset evaluation. ``` % hyperfine --sort command --warmup 3 --runs 10 -L bin jj-1,jj-2 \ 'target/release-with-debug/{bin} -R ~/mirrors/git --ignore-working-copy \ log -r "::@ & file(root:builtin)" --no-graph -n50' Benchmark 1: target/release-with-debug/jj-1 .. Time (mean ± σ): 3.512 s ± 0.014 s [User: 3.391 s, System: 0.119 s] Range (min … max): 3.489 s … 3.528 s 10 runs Benchmark 2: target/release-with-debug/jj-2 .. Time (mean ± σ): 1.351 s ± 0.010 s [User: 1.275 s, System: 0.074 s] Range (min … max): 1.332 s … 1.366 s 10 runs Relative speed comparison 2.60 ± 0.02 target/release-with-debug/jj-1 .. 1.00 target/release-with-debug/jj-2 .. ```
- Loading branch information