jj/lib/tests
Martin von Zweigbergk f40adb84fc merged_tree: add a Stream for concurrent diff off trees
When diffing two trees, we currently start at the root and diff those
trees. Then we diff each subtree, one at a time, recursively. When
using a commit backend that uses remote storage, like our backend at
Google does, diffing the subtrees one at a time gets very slow. We
should be able to diff subtrees concurrently. That way, the number of
roundtrips to a server becomes determined by the depth of the deepest
difference instead of by the number of differing trees (times 2,
even). This patch implements such an algorithm behind a `Stream`
interface. It's not hooked in to `MergedTree::diff_stream()` yet; that
will happen in the next commit.

I timed the new implementation by updating `jj diff -s` to use the new
diff stream and then ran it on the Linux repo with `jj diff
--ignore-working-copy -s --from v5.0 --to v6.0`. That slowed down by
~20%, from ~750 ms to ~900 ms. Maybe we can get some of that
performance back but I think it'll be hard to match
`MergedTree::diff()`. We can decide later if we're okay with the
difference (after hopefully reducing the gap a bit) or if we want to
keep both implementations.

I also timed the new implementation on our cloud-based repo at
Google. As expected, it made some diffs much faster (I'm not sure if
I'm allowed to share figures).
2023-11-06 23:12:02 -08:00
..
test_bad_locking.rs workspace: load working copy implementation dynamically 2023-10-16 22:33:44 -07:00
test_commit_builder.rs merged_tree: propagate backend errors in diff iterator 2023-10-26 06:20:56 -07:00
test_commit_concurrent.rs
test_conflicts.rs merge: simply print interleaved conflict values in debug output 2023-11-06 07:21:06 +09:00
test_default_revset_graph_iterator.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_diff_summary.rs merged_tree: propagate backend errors in diff iterator 2023-10-26 06:20:56 -07:00
test_git.rs git: add config to disable abandoning of unreachable commits 2023-11-05 06:10:54 -08:00
test_id_prefix.rs
test_index.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_init.rs workspace: add function that initializes colocated git repository 2023-11-05 08:48:35 +09:00
test_load_repo.rs test: use test backend in most remaining tests too 2023-09-24 21:24:01 -07:00
test_local_working_copy.rs working copy: pass commit instead of tree into check_out() 2023-10-16 22:33:44 -07:00
test_local_working_copy_concurrent.rs workspace: load working copy implementation dynamically 2023-10-16 22:33:44 -07:00
test_local_working_copy_sparse.rs working copy: pass commit instead of tree into check_out() 2023-10-16 22:33:44 -07:00
test_merge_trees.rs merge: have Merge::adds()/removes() return iterator 2023-11-05 16:43:06 +09:00
test_merged_tree.rs merged_tree: add a Stream for concurrent diff off trees 2023-11-06 23:12:02 -08:00
test_mut_repo.rs view: add tracking state to RemoteRef 2023-10-16 23:21:05 +09:00
test_operations.rs tests: test views, operations, and mutable repos only with test backend 2023-09-20 07:47:30 -07:00
test_refs.rs refs: use swap_remove() in non-trivial merge of ref targets 2023-11-07 06:52:35 +09:00
test_revset.rs revset: add support for glob:pattern 2023-10-21 09:55:01 +09:00
test_rewrite.rs cli: add a function for restoring part of a tree from another tree 2023-11-02 06:07:45 -07:00
test_view.rs refs: merge tracking state of remote branches 2023-10-24 07:13:58 +09:00
test_workspace.rs workspace: make working-copy type customizable 2023-10-16 22:33:44 -07:00