jj/lib/src
Martin von Zweigbergk e50f6acab1 templater: fast-path empty and conflict to not read trees
When there's a single parent, we can determine if a commit is empty by
just comparing the tree ids. Also, when using tree-level conflicts, we
don't need to read the trees to determine if there's a conflict. This
patch adds both of those fast paths, speeding up `jj log -r ::main`
from 317 ms to 227 ms (-28.4%). It has much larger impact with our
cloud-based backend at Google (~5x faster).

I made the same fix in the revset engine and the Git push code (thanks
to Yuya for the suggestion).
2023-09-26 18:18:52 -07:00
..
lock perf: add several #[instrument]s 2023-07-28 09:28:01 -07:00
protos working_copy: enable storing multiple tree ids in state file 2023-08-27 06:49:45 -07:00
backend.rs backend: move constant functions first 2023-09-19 05:24:51 -07:00
commit.rs templater: fast-path empty and conflict to not read trees 2023-09-26 18:18:52 -07:00
commit_builder.rs commit_builder: remove last traces of pre-MergedTree API 2023-08-29 07:01:52 -07:00
conflicts.rs conflicts: leverage Merge::map() in materialize_merge_result() 2023-09-01 16:23:39 -07:00
content_hash.rs content_hash: make public 2023-09-18 07:53:19 -07:00
dag_walk.rs dag_walk: add topological sort that runs Kahn's algorithm with heap queue 2023-08-15 15:03:45 +09:00
default_index_store.rs cleanup: replace x[n..n+l] by x[n..][..l] 2023-08-21 22:29:46 -07:00
default_revset_engine.rs templater: fast-path empty and conflict to not read trees 2023-09-26 18:18:52 -07:00
default_revset_graph_iterator.rs revset_graph: remove unneeded Vec<IndexGraphEdge> cloning 2023-08-04 06:19:22 +09:00
default_submodule_store.rs
diff.rs
file_util.rs
files.rs conflicts: move Merge<T> to merge module 2023-08-06 22:08:09 +00:00
fmt_util.rs settings: support human-readable byte sizes for max-new-file-size 2023-08-17 19:29:38 -07:00
fsmonitor.rs perf: add several #[instrument]s 2023-07-28 09:28:01 -07:00
git.rs git: make fetch() import local tags in addition to remote branches 2023-09-26 00:47:00 +09:00
git_backend.rs backend: move constant functions first 2023-09-19 05:24:51 -07:00
gitignore.rs Fix .gitignore handling of ignored directories 2023-08-22 22:08:32 -07:00
hex_util.rs
id_prefix.rs revset: resolve "@" symbol's workspace id earlier (while parsing) 2023-08-20 17:57:18 -07:00
index.rs
lib.rs content_hash: make public 2023-09-18 07:53:19 -07:00
local_backend.rs local_backend: don't write commits with no parents 2023-09-25 15:41:45 -07:00
lock.rs
matchers.rs working_copy: traverse filesystem in parallel 2023-08-03 18:20:49 +00:00
merge.rs merge: add a function for padding a Merge to a given size 2023-09-01 06:09:37 -07:00
merged_tree.rs tests: use test backend in working copy tests, fix MergedTree bug 2023-09-19 20:49:41 -07:00
op_heads_store.rs op_heads_store: propagate errors from OpStore 2023-08-31 12:36:47 -07:00
op_store.rs merge: add Merge::is_absent() and Merge::is_present() 2023-08-25 06:40:36 -07:00
operation.rs Fix cargo +nightly clippy warnings 2023-07-28 22:19:52 -07:00
refs.rs refs: rename RefTarget::as_conflict() to as_merge() 2023-08-07 08:05:57 +09:00
repo.rs merged_tree: add config option to write trees using new format 2023-08-30 06:17:21 -07:00
repo_path.rs repo_path: avoid repeated copying of PathBuf in to_fs_path() 2023-09-09 08:43:29 -07:00
revset.pest revset: add 0-ary "::" and ".." operators as short for "all()" and "~root()" 2023-09-05 10:40:04 +09:00
revset.rs cli: make set of immutable commits configurable 2023-09-25 15:41:45 -07:00
revset_graph.rs revsets: allow :: as synonym for : 2023-07-28 22:30:40 -07:00
rewrite.rs store: add a empty_merged_tree_id() helper 2023-08-30 19:58:42 -07:00
settings.rs cli: rewrite "x | x-" in default log revset as "ancestors(x, 2)" 2023-09-08 09:28:14 +09:00
simple_op_heads_store.rs
simple_op_store.rs refs: rename RefTarget::as_conflict() to as_merge() 2023-08-07 08:05:57 +09:00
stacked_table.rs cleanup: replace x[n..n+l] by x[n..][..l] 2023-08-21 22:29:46 -07:00
store.rs backend: move constant functions first 2023-09-19 05:24:51 -07:00
submodule_store.rs
transaction.rs
tree.rs tree: leverage Merge::try_map() when reading file contents to merge 2023-09-22 19:33:48 -07:00
tree_builder.rs tree_builder: remove unnecessary has_overrides() method 2023-08-26 07:02:04 -07:00
view.rs
working_copy.rs watchman: use single-threaded async runtime 2023-09-24 15:46:13 -07:00
workspace.rs cleanup: use fs:read() instead of File::open().read_to_end() 2023-08-13 14:04:59 +00:00