ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/cli
Martin von Zweigbergk 72245cfac5 merged_tree: add Stream-based version of diff(), delegating for now
I'm going to implement a `Stream`-based version optimized for
high-latency (RPC-based) commit backends. So far, that implementation
is about 20% slower in the Linux repo when running `jj diff
--ignore-working-copy -s --from v5.0 --to v6.0`. I think that's almost
only because the algorithm is different, not because it's async per
se.

This commit adds a `Stream`-based version of `MergedTree::diff()` that
just wraps the regular iterator in stream. I updated `jj diff` to use
it. I couldn't measure any difference on the command above in the
Linux repo. I think that means we can safely use the same
`Stream`-based interface regardless of backend, even if we end up
needing two different implementations of the `Stream`. We would then
be using the wrapped iterator from this commit for local backends, and
the new implementation for remote backends. But ideally we can make
the remote-friendly implementation fast enough that we don't need two
implementations.
2023-11-03 08:15:10 -07:00
..
examples
src merged_tree: add Stream-based version of diff(), delegating for now 2023-11-03 08:15:10 -07:00
testing
tests git_backend: replace git2::Repository with gix::Repository 2023-11-02 19:33:06 +09:00
build.rs
Cargo.toml async: switch to pollster's block_on() 2023-11-03 08:15:10 -07:00
LICENSE