jj/lib/src
Yuya Nishihara a609580204 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 ..
```
2024-08-13 15:02:24 +09:00
..
default_index revset: avoid merging whole parent trees by file()/diff_contains() query 2024-08-13 15:02:24 +09:00
lock
protos working_copy: Add is_file_states_sorted to tree state proto 2024-05-31 22:28:35 +10:00
backend.rs copy-tracking: Add copy tracking as a post iteration step 2024-08-11 17:01:45 -04:00
commit.rs repo: consider empty and undescribed merge commits as discardable 2024-05-29 06:54:30 -07:00
commit_builder.rs commit_builder: remove unneeded &mut from .write_hidden() 2024-07-25 22:39:00 +09:00
conflicts.rs copy-tracking: create a MaterializedTreeDiffEntry type 2024-08-11 17:01:45 -04:00
content_hash.rs Nightly clippy fixes 2024-03-02 18:19:14 -08:00
dag_walk.rs dag_walk: do one less clone() in heads_ok() 2024-06-25 11:54:03 +09:00
default_submodule_store.rs
diff.rs diff: leverage BStr for better debug printing 2024-07-14 23:26:29 +09:00
dsl_util.rs revset, templater: implement arity-based alias overloading 2024-06-14 23:11:29 +09:00
extensions_map.rs extensions_map: create a type-safe container for arbitrary objects 2024-03-12 16:52:49 -04:00
file_util.rs workspace add: add filename context to FS error 2024-07-01 16:05:29 -07:00
files.rs files: relax requirement of merge() inputs 2024-07-18 11:34:43 +09:00
fileset.pest fileset: parse glob characters as identifier 2024-07-18 13:49:10 +09:00
fileset.rs revset: parse file() argument as fileset expression 2024-07-16 10:18:57 +09:00
fileset_parser.rs fileset: parse glob characters as identifier 2024-07-18 13:49:10 +09:00
fmt_util.rs
fsmonitor.rs Add background snapshotting info to debug watchman status. 2024-06-20 16:09:06 -04:00
git.rs cargo: bump git2 to 0.19.0 2024-08-13 11:47:21 +08:00
git_backend.rs copy-tracking: create CopyRecordMap and add it to diff summaries 2024-08-11 17:01:45 -04:00
gitignore.rs
gpg_signing.rs gpg: drop redundant "exit status" from error message 2024-05-13 08:30:00 -07:00
graph.rs revset_graph: rename to graph and make generic over graph node type 2024-05-31 02:39:34 +08:00
hex_util.rs hex_utils: fix typo found by clippy 2024-03-25 21:23:09 -07:00
id_prefix.rs lib id_prefix: look for divergent changes outside short prefix set 2024-06-29 11:44:26 -07:00
index.rs index_store: add more scope to write_index() 2024-05-10 09:22:09 -04:00
lib.rs revset: create DatePattern type 2024-08-01 09:04:07 -07:00
local_backend.rs copy-tracking: create CopyRecordMap and add it to diff summaries 2024-08-11 17:01:45 -04:00
local_working_copy.rs copy-tracking: plumb CopyRecordMap through diff method 2024-08-11 17:01:45 -04:00
lock.rs
matchers.rs matchers: add matcher for glob patterns 2024-04-18 11:09:54 +09:00
merge.rs merged_tree: replace MergedTreeVal<'_> by Merge<Option<&TreeValue>> 2024-08-12 23:01:46 +09:00
merged_tree.rs merged_tree: add function that resolves file conflicts non-recursively 2024-08-13 15:02:24 +09:00
object_id.rs Add documentation comments for several types 2024-03-02 15:01:55 -05:00
op_heads_store.rs
op_store.rs
op_walk.rs cli: make "op abandon" not fail with multiple op heads 2024-08-07 10:51:44 +09:00
operation.rs Add documentation comments for operation, transaction, and view types 2024-03-02 15:35:41 -05:00
refs.rs
repo.rs repo: define a public constructor for RepoLoader 2024-07-31 19:45:37 -04:00
repo_path.rs repo_path: add type for formatting and parsing RepoPath, use in CLI 2024-05-28 21:36:40 -07:00
revset.pest revset: remove deprecated "program" rule, rename "program_with_modifier" 2024-06-08 12:48:46 +09:00
revset.rs revset: add author_date and committer_date revset functions 2024-08-01 09:04:07 -07:00
revset_parser.rs revset: parse file() argument as fileset expression 2024-07-16 10:18:57 +09:00
rewrite.rs rewrite: migrate move_commits function from rebase command 2024-08-12 21:48:17 +08:00
secret_backend.rs copy-tracking: create CopyRecordMap and add it to diff summaries 2024-08-11 17:01:45 -04:00
settings.rs revset: add author_date and committer_date revset functions 2024-08-01 09:04:07 -07:00
signing.rs
simple_op_heads_store.rs
simple_op_store.rs lib: make git support optional via crate feature 2024-06-11 22:03:20 +09:00
ssh_signing.rs signing: remove redundant "exit status" from SSH backend error 2024-05-14 10:24:28 +09:00
stacked_table.rs clippy: disable bogus lints for nightly clippy 2024-04-05 11:39:29 -05:00
store.rs copy-tracking: create CopyRecordMap and add it to diff summaries 2024-08-11 17:01:45 -04:00
str_util.rs str_util: add regex pattern 2024-07-22 12:00:52 +09:00
submodule_store.rs
time_util.rs revset: create DatePattern type 2024-08-01 09:04:07 -07:00
transaction.rs index_store: add more scope to write_index() 2024-05-10 09:22:09 -04:00
tree.rs merged_tree: replace MergedTreeVal<'_> by Merge<Option<&TreeValue>> 2024-08-12 23:01:46 +09:00
tree_builder.rs tree: fill in valid id to null tree, rename function to empty() 2024-08-11 18:23:21 +09:00
union_find.rs union_find: implement a library for the Union-Find algorithm 2024-05-21 10:52:31 -04:00
view.rs cli: branch: inline view.remove_branch() in cmd_branch_forget() 2024-06-28 10:29:06 +09:00
working_copy.rs working_copy: drop "Internal backend error" message from error 2024-06-17 14:33:29 +09:00
workspace.rs workspace: make the constructor public 2024-07-31 19:45:37 -04:00