dependabot[bot]
e44c1e98ec
cargo: bump the cargo-dependencies group with 8 updates
...
Bumps the cargo-dependencies group with 8 updates:
| Package | From | To |
| --- | --- | --- |
| [clap](https://github.com/clap-rs/clap ) | `4.5.42` | `4.5.43` |
| [clap_complete](https://github.com/clap-rs/clap ) | `4.5.55` | `4.5.56` |
| [hashbrown](https://github.com/rust-lang/hashbrown ) | `0.15.4` | `0.15.5` |
| [libc](https://github.com/rust-lang/libc ) | `0.2.174` | `0.2.175` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2 ) | `1.0.95` | `1.0.96` |
| [slab](https://github.com/tokio-rs/slab ) | `0.4.10` | `0.4.11` |
| [rustversion](https://github.com/dtolnay/rustversion ) | `1.0.21` | `1.0.22` |
| [whoami](https://github.com/ardaku/whoami ) | `1.6.0` | `1.6.1` |
Updates `clap` from 4.5.42 to 4.5.43
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.42...clap_complete-v4.5.43 )
Updates `clap_complete` from 4.5.55 to 4.5.56
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.55...clap_complete-v4.5.56 )
Updates `hashbrown` from 0.15.4 to 0.15.5
- [Release notes](https://github.com/rust-lang/hashbrown/releases )
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.15.4...v0.15.5 )
Updates `libc` from 0.2.174 to 0.2.175
- [Release notes](https://github.com/rust-lang/libc/releases )
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.175/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/libc/compare/0.2.174...0.2.175 )
Updates `proc-macro2` from 1.0.95 to 1.0.96
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.95...1.0.96 )
Updates `slab` from 0.4.10 to 0.4.11
- [Release notes](https://github.com/tokio-rs/slab/releases )
- [Changelog](https://github.com/tokio-rs/slab/blob/master/CHANGELOG.md )
- [Commits](https://github.com/tokio-rs/slab/compare/v0.4.10...v0.4.11 )
Updates `rustversion` from 1.0.21 to 1.0.22
- [Release notes](https://github.com/dtolnay/rustversion/releases )
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.21...1.0.22 )
Updates `whoami` from 1.6.0 to 1.6.1
- [Release notes](https://github.com/ardaku/whoami/releases )
- [Commits](https://github.com/ardaku/whoami/commits )
---
updated-dependencies:
- dependency-name: clap
dependency-version: 4.5.43
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: clap_complete
dependency-version: 4.5.56
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: hashbrown
dependency-version: 0.15.5
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: libc
dependency-version: 0.2.175
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: proc-macro2
dependency-version: 1.0.96
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: slab
dependency-version: 0.4.11
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: rustversion
dependency-version: 1.0.22
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: whoami
dependency-version: 1.6.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 02:33:37 +00:00
dependabot[bot]
bb1c34767b
github: bump the github-dependencies group with 4 updates
...
Bumps the github-dependencies group with 4 updates: [actions/checkout](https://github.com/actions/checkout ), [taiki-e/install-action](https://github.com/taiki-e/install-action ), [rui314/setup-mold](https://github.com/rui314/setup-mold ) and [github/codeql-action](https://github.com/github/codeql-action ).
Updates `actions/checkout` from 4.2.2 to 5.0.0
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](11bd71901b...08c6903cd8 )
Updates `taiki-e/install-action` from 2.57.6 to 2.58.9
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](6064345e66...2c73a741d1 )
Updates `rui314/setup-mold` from 702b1908b5edf30d71a8d1666b724e0f0c6fa035 to 7344740a9418dcdcb481c7df83d9fbd1d5072d7d
- [Commits](702b1908b5...7344740a94 )
Updates `github/codeql-action` from 3.29.7 to 3.29.8
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](51f77329af...76621b61de )
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 5.0.0
dependency-type: direct:production
update-type: version-update:semver-major
dependency-group: github-dependencies
- dependency-name: taiki-e/install-action
dependency-version: 2.58.9
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: github-dependencies
- dependency-name: rui314/setup-mold
dependency-version: 7344740a9418dcdcb481c7df83d9fbd1d5072d7d
dependency-type: direct:production
dependency-group: github-dependencies
- dependency-name: github/codeql-action
dependency-version: 3.29.8
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 21:04:46 +00:00
Yuya Nishihara
e31069cd3c
index: index changed paths by add_commit()
...
Tests of the indexed contents will be added with the revset engine integration.
We don't have a public interface to get the indexed changed paths right now.
2025-08-11 11:50:39 +00:00
Yuya Nishihara
6bb26d8e73
index: include changed-path index in stats()
2025-08-11 11:50:39 +00:00
Yuya Nishihara
132d74a234
index: read/write changed-path index segments
2025-08-11 11:50:39 +00:00
Yuya Nishihara
3902d88b3e
index: migrate operation link file to protobuf
...
I'm going to add changed-path index, and the operation link file will store a
list of segment files and a starting commit position. Suppose the link file is
small, we wouldn't need our own serialization format.
This patch adds new directory for proto-based operation link files. We could
reuse the existing directory, but that would make debugging a bit harder.
2025-08-11 11:50:39 +00:00
Yuya Nishihara
3f0126191d
index: don't use persist_content_addressed_temp_file() to write operation link
...
A link file isn't addressed by its content but by the associated operation id.
There's no guarantee that the stored content never changes.
2025-08-11 11:50:39 +00:00
Gaëtan Lehmann
2e2127c56b
log: add templates to anonymize the output
2025-08-10 19:24:36 +00:00
Gaëtan Lehmann
d526a6f0fd
template: add a hash function
2025-08-10 19:24:36 +00:00
Isaac Corbrey
55764e822c
cli describe: Clarify short description for --reset-author
...
The short description for `--reset-author` previously made no mention of
updating the author timestamp as well as the author name and email. This
change adds verbiage to clarify that.
2025-08-10 11:42:43 +00:00
Daniel Luz
5d63b11e39
cli: provide file completion for util exec args
...
Makes command aliases provide similar completion to the shell's default.
2025-08-10 04:10:46 +00:00
Joaquín Triñanes
a50147c23c
docs: fix nested list rendering as top level
...
While the generated markdown is correct, it was being rendered as a
single list. This might be caused by the `mdx_breakless_lists` plugin
because the issue doesn't happen when the plugin isn't used (that is,
when the list actually has linebreaks above it).
2025-08-10 04:10:35 +00:00
Evan Martin
60a6e9421b
cli: make diff --stat show byte counts for binary files
...
Fixes #6865 .
2025-08-09 21:36:04 +00:00
Ilya Grigoriev
3d91d6e21b
clippy: auto-fixes of clippy::implicit-clone with latest nightly
2025-08-09 03:44:26 +00:00
Emily
5aa7b4cf7e
tests: compute the schema defaults in Rust rather than using jq(1)
...
This is a simple computation over the JSON structure of the schema,
so it doesn’t need pulling in another programming language and a
dependency on an external C program to interpret it.
2025-08-08 16:19:30 +00:00
Emily
311299bab5
tests: use jsonschema directly instead of taplo(1)
...
This removes an external tool dependency, skips the complexities
of subprocessing, and avoids having to poke a hole in the macOS
Nix sandbox because of `reqwest` trying to read the system’s TLS
configuration.
Note that despite the `Cargo.lock` getting bigger, this is actually a
net reduction of dependencies, as Taplo is written in Rust and pulls
in not only `jsonschema` but much more besides.
2025-08-08 16:19:30 +00:00
Ivan Petkov
dc5056ac91
cli: git clone: support --fetch-tags
2025-08-08 15:44:22 +00:00
Ivan Petkov
144e2c9c63
cli: git remote add: support --fetch-tags
2025-08-08 15:44:22 +00:00
Ivan Petkov
bf974d6911
git: support specifying tag fetch behavior when adding a remote
2025-08-08 15:44:22 +00:00
Ivan Petkov
c3574f99f1
lib/git: treat tagOpt as a standard option
...
In a future commit we'll add support for controlling a git remote's tag
fetch behavior, which may result in a `tagOpt = --[no-]tags` entry in
the remote configuration.
Doing this change here means we will avoid incorrectly flagging remote
configurations as unsupported.
2025-08-08 15:44:22 +00:00
Austin Seipp
afb1c1446d
git: add git.colocate to colocate repos by default
...
Most users colocate all of their repositories or none of them. A config
option is more convenient in that situation.
There are also plans to make colocated repos the default. This change
paves the way to flip the default easily.
Closes #2507 .
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-08-08 07:08:46 +00:00
Yuya Nishihara
e9716761d1
cargo: bump zerovec because previous version is yanked
...
warning: package `zerovec v0.11.3` in Cargo.lock is yanked in registry
`crates-io`, consider running without --locked
2025-08-08 01:32:25 +00:00
Ivan Petkov
27501ee6dd
nix: add numpy to the devshell
...
For some reason using uv's managed version of numpy fails to import.
Adding it as a flake input seems to fix things.
2025-08-07 15:13:21 +00:00
Ivan Petkov
fa649051bb
docs: add a note about rustfmt configuration for Nix/direnv users
...
The flake/devShell is already configured to pull in a nightly version of
`rustfmt` which means running `rustfmt +nightly` will actually fail
(since we aren't pulling in `rustup`).
2025-08-07 15:13:21 +00:00
Yuya Nishihara
8435ebaa9c
cli: file show: add templating support
...
The primary use case is to insert header/separator when printing multiple file
entries.
"jj file show" accepts the same template argument as "jj file list", and file
content is not included in the template. This is basically the same as the
relation between "jj show" and "jj log".
Closes #7181
2025-08-07 14:52:02 +00:00
Yuya Nishihara
36134a5f96
index: ensure that bit set panics on integer underflow
...
We'll get out-of-bounds read error later, but the panic message would be a bit
difficult to reason about.
2025-08-07 14:46:08 +00:00
Yuya Nishihara
331bd4e859
revset_graph: fix out-of-bounds bit set lookup in remove_transitive_edges()
...
The problem was spotted by Martin. Since we've made remove_transitive_edges()
omit "missing" edges from the set of nodes to visit at ad7c42e04b
"revset_graph: ignore missing edges thoroughly in remove_transitive_edges()", we
should also skip them in the input set.
This patch updates all test cases to run at bit-set boundary to detect other
potential issues.
2025-08-07 14:46:08 +00:00
Clément
7efb529add
rebase: improve error messages when rebasing a change onto itself
...
The `-r` flag triggered a warning different from the `-s` one, while
being more explicit ("Cannot rebase 0000000 onto descendant 0000000" ->
"Cannot rebase 0000000 onto itself")
2025-08-07 08:37:31 +00:00
Yuya Nishihara
1edcd79af7
index: add data structure for changed-path index
...
This patch implements data format, serialization, and deserialization. Actual
indexing functions and disk I/O will be added later.
The data format is simple. It's basically a sorted table of paths + pointers to
the table entries per commit. Git employs Bloom filter for this purpose, but I
don't think we need a probabilistic data structure. The size of the serialized
index segments isn't big compared to the commit index segments, and the lookup
performance seems good. It's also important that we don't need to merge parent
trees when a path matches the indexed changed paths.
With git repo (77410 commits):
- changed-path segment file size: ~1.1MB
- jj log --ignore-working-copy README.md: ~0.2sec wall
Indexing takes minutes. That's not surprising because we have to merge parent
trees to get diffs.
#4674
2025-08-07 02:04:23 +00:00
Austin Seipp
44de571887
release: 0.32.0
...
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-08-06 16:36:14 +00:00
Isaac Corbrey
348e51f008
github: Enforce commit subject line format
2025-08-06 15:45:14 +00:00
Martin von Zweigbergk
c4fefdb03f
cli: add debug commands for printing commits, operations, etc.
...
This should be useful when debugging people's repos. For example, I've
sometimes wondered how many sides the top-level tree conflict has.
I made the new command support operations and views too, mostly for
consistency. That makes `jj debug operation` quite redundant. However,
that command is a bit higher-level and may still be useful. I don't
see much reason to delete it.
2025-08-06 15:02:23 +00:00
Nigthknight
ad5a4b3172
copy-tracking: fix path tracking for nested directories with equal names
...
The problem was that the calculation of the suffix was overlapping into
the the prefix for nested directories with the same name. We skipped the
prefix to avoid this issue.
Issue: #6853
Co-authored-by: Tobias Markus <tobias@miglix.eu>
2025-08-06 06:14:57 +00:00
George Elliott-Hunter
35a0bd330a
docs: Fix 7176, document colocating a repo in Windows
2025-08-06 04:49:38 +00:00
Martin von Zweigbergk
3a7ce87f44
rewrite: make duplicate_commits() async
2025-08-06 03:12:05 +00:00
Martin von Zweigbergk
073a1dea74
rewrite: make CommitRewriter::rebase() async
2025-08-06 03:12:05 +00:00
Martin von Zweigbergk
82d7182ef7
repo: take async callback to transform_descendants()
...
Maybe we can make `transform_descendants()` transform siblings
concurrently later.
2025-08-06 03:12:05 +00:00
Stephen Jennings
3ad854f975
fix: add $root variable that can be used in commands
...
On Windows, spawning a child process finds the command relative to the
parent's working directory. If a command is specified as
`["path/inside/repo/tool.exe"]`, then tool won't be found if `jj fix` is
run from a subdirectory of the workspace.
There doesn't seem to be a good way to change this behavior, nor does it
seem easy to convert `program` into an absolute path because
`["tool.exe"]` could refer either to a file on the PATH or a file
committed at the root of the repository.
So, we add a new variable `$root` that can be used in this situation.
Workspace-relative tools on Windows should be defined using this
variable:
```toml
# Tools on the PATH
command = ["tool.exe"]
# Workspace-relative tools
command = ["$root/tool.exe"]
command = ["$root/nested/dir/tool.exe"]
```
On Unix, the command is found relative to the working directory of the
child process, so this isn't an issue.
Fixes #7144
2025-08-05 14:37:04 +00:00
Martin von Zweigbergk
6a7c0fb5ea
merged_tree: respect Backend::concurrency() in merge_trees()
2025-08-05 14:29:57 +00:00
Martin von Zweigbergk
b14fad00be
merged_tree: rewrite merge_trees() to be non-recursive and concurrent
...
We ran into a stack overflow in `merge_trees()` at Google due to
limited stack space and large stack frames caused by async code. This
patch fixes that by making `merge_trees()` non-recursive. Since I was
rewriting the algortithm anyway, I also made it concurrent, addressing
a TODO.
2025-08-05 14:29:57 +00:00
Martin von Zweigbergk
ca839f9d50
merged_tree: separate out trivially resolved entries when resolving
...
The goal of this change is to have the cheap, non-async code separated
from the async code.
2025-08-05 14:29:57 +00:00
Martin von Zweigbergk
2e249babe0
merged_tree: move construction of backend trees onto new type
...
Once we make the tree-merging concurrent, we are going to keep once
instance of this type per unfinished directory merge.
2025-08-05 14:29:57 +00:00
Martin von Zweigbergk
97ee86d513
merged_tree: build conflicted resolved trees from sorted conflicts
...
This addresses the TODO about creating the full tree entries by
merging the sorted list of conflicts with (one side of) the sorted
list of conflicts.
2025-08-05 14:29:57 +00:00
Martin von Zweigbergk
38bd4348c5
tests: slightly clarify a comment
2025-08-05 14:29:57 +00:00
Yuya Nishihara
cc0667e439
cargo: update gix dependencies
2025-08-05 14:11:29 +00:00
dependabot[bot]
201f64da38
github: bump the github-dependencies group with 2 updates
...
Bumps the github-dependencies group with 2 updates: [taiki-e/install-action](https://github.com/taiki-e/install-action ) and [github/codeql-action](https://github.com/github/codeql-action ).
Updates `taiki-e/install-action` from 2.57.1 to 2.57.6
- [Release notes](https://github.com/taiki-e/install-action/releases )
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md )
- [Commits](a416ddeedb...6064345e66 )
Updates `github/codeql-action` from 3.29.4 to 3.29.5
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](4e828ff8d4...51f77329af )
---
updated-dependencies:
- dependency-name: taiki-e/install-action
dependency-version: 2.57.6
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
- dependency-name: github/codeql-action
dependency-version: 3.29.5
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: github-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-08-05 10:09:24 +00:00
dependabot[bot]
e3c99b7fb8
cargo: bump the cargo-dependencies group with 3 updates
...
Bumps the cargo-dependencies group with 3 updates: [clap](https://github.com/clap-rs/clap ), [serde_json](https://github.com/serde-rs/json ) and [tokio](https://github.com/tokio-rs/tokio ).
Updates `clap` from 4.5.41 to 4.5.42
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.41...clap_complete-v4.5.42 )
Updates `serde_json` from 1.0.141 to 1.0.142
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.141...v1.0.142 )
Updates `tokio` from 1.47.0 to 1.47.1
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.47.0...tokio-1.47.1 )
---
updated-dependencies:
- dependency-name: clap
dependency-version: 4.5.42
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: serde_json
dependency-version: 1.0.142
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
- dependency-name: tokio
dependency-version: 1.47.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: cargo-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-08-05 01:32:03 +00:00
Yuya Nishihara
1447791a74
revset_graph: use Rc to propagate edges without cloning
...
This saves memory usage.
In small repo:
- jj-1: with original remove_transitive_edges()
- jj-4: previous patch
- jj-5: this patch
```
% hyperfine --sort command --warmup 3 --runs 10 -L bin jj-1,jj-2,jj-3,jj-4,jj-5 \
'target/release-with-debug/{bin} -R ~/mirrors/git --ignore-working-copy log -r "tags()"'
Benchmark 1: target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
Time (mean ± σ): 1.511 s ± 0.091 s [User: 1.296 s, System: 0.214 s]
Range (min … max): 1.432 s … 1.674 s 10 runs
Benchmark 4: target/release-with-debug/jj-4 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
Time (mean ± σ): 1.142 s ± 0.055 s [User: 1.043 s, System: 0.099 s]
Range (min … max): 1.106 s … 1.287 s 10 runs
Benchmark 5: target/release-with-debug/jj-5 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
Time (mean ± σ): 1.201 s ± 0.082 s [User: 1.101 s, System: 0.100 s]
Range (min … max): 1.095 s … 1.299 s 10 runs
Relative speed comparison
1.32 ± 0.10 target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
1.00 target/release-with-debug/jj-4 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
1.05 ± 0.09 target/release-with-debug/jj-5 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
```
In mid-size repo:
```
% hyperfine --sort command --warmup 3 --runs 10 -L bin jj-1,jj-2,jj-3,jj-4,jj-5 \
'target/release-with-debug/{bin} -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"'
Benchmark 1: target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
Time (mean ± σ): 937.7 ms ± 68.8 ms [User: 672.1 ms, System: 265.4 ms]
Range (min … max): 868.3 ms … 1025.4 ms 10 runs
Benchmark 4: target/release-with-debug/jj-4 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
Time (mean ± σ): 979.9 ms ± 65.4 ms [User: 802.6 ms, System: 177.2 ms]
Range (min … max): 905.6 ms … 1055.0 ms 10 runs
Benchmark 5: target/release-with-debug/jj-5 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
Time (mean ± σ): 879.4 ms ± 62.1 ms [User: 754.0 ms, System: 125.4 ms]
Range (min … max): 823.1 ms … 960.4 ms 10 runs
Relative speed comparison
1.07 ± 0.11 target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
1.11 ± 0.11 target/release-with-debug/jj-4 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
1.00 target/release-with-debug/jj-5 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
```
2025-08-05 01:31:32 +00:00
Yuya Nishihara
d8166b46f0
revset_graph: remove transitive edges of both internal and external commits
...
With changed-path index, I noticed "jj log PATH" in Linux repo freezes because
of out of memory. The problem can be mitigated by sharing edges values by Rc,
but the computation is still slow. It seems better to keep edges to propagate
small.
In small repo:
- jj-1: with original remove_transitive_edges()
- jj-4: this patch
```
% hyperfine --sort command --warmup 3 --runs 10 -L bin jj-1,jj-2,jj-3,jj-4,jj-5 \
'target/release-with-debug/{bin} -R ~/mirrors/git --ignore-working-copy log -r "tags()"'
Benchmark 1: target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
Time (mean ± σ): 1.511 s ± 0.091 s [User: 1.296 s, System: 0.214 s]
Range (min … max): 1.432 s … 1.674 s 10 runs
Benchmark 4: target/release-with-debug/jj-4 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
Time (mean ± σ): 1.142 s ± 0.055 s [User: 1.043 s, System: 0.099 s]
Range (min … max): 1.106 s … 1.287 s 10 runs
Relative speed comparison
1.32 ± 0.10 target/release-with-debug/jj-1 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
1.00 target/release-with-debug/jj-4 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
```
In mid-size repo:
```
% hyperfine --sort command --warmup 3 --runs 10 -L bin jj-1,jj-2,jj-3,jj-4,jj-5 \
'target/release-with-debug/{bin} -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"'
Benchmark 1: target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
Time (mean ± σ): 937.7 ms ± 68.8 ms [User: 672.1 ms, System: 265.4 ms]
Range (min … max): 868.3 ms … 1025.4 ms 10 runs
Benchmark 4: target/release-with-debug/jj-4 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
Time (mean ± σ): 979.9 ms ± 65.4 ms [User: 802.6 ms, System: 177.2 ms]
Range (min … max): 905.6 ms … 1055.0 ms 10 runs
Relative speed comparison
1.07 ± 0.11 target/release-with-debug/jj-1 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
1.11 ± 0.11 target/release-with-debug/jj-4 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
```
2025-08-05 01:31:32 +00:00
Yuya Nishihara
a523657525
revset_graph: add fast path for linear ranges
...
This patch itself isn't significant win, but will help us optimize both CPU and
memory use.
In small repo:
- jj-2: previous patch
- jj-3: this patch
```
% hyperfine --sort command --warmup 3 --runs 10 -L bin jj-1,jj-2,jj-3,jj-4,jj-5 \
'target/release-with-debug/{bin} -R ~/mirrors/git --ignore-working-copy log -r "tags()"'
Benchmark 2: target/release-with-debug/jj-2 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
Time (mean ± σ): 2.467 s ± 0.142 s [User: 2.271 s, System: 0.196 s]
Range (min … max): 2.246 s … 2.588 s 10 runs
Benchmark 3: target/release-with-debug/jj-3 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
Time (mean ± σ): 2.254 s ± 0.169 s [User: 2.070 s, System: 0.184 s]
Range (min … max): 2.055 s … 2.395 s 10 runs
Relative speed comparison
2.16 ± 0.16 target/release-with-debug/jj-2 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
1.97 ± 0.18 target/release-with-debug/jj-3 -R ~/mirrors/git --ignore-working-copy log -r "tags()"
```
In mid-size repo:
```
% hyperfine --sort command --warmup 3 --runs 10 -L bin jj-1,jj-2,jj-3,jj-4,jj-5 \
'target/release-with-debug/{bin} -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"'
Benchmark 2: target/release-with-debug/jj-2 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
Time (mean ± σ): 1.185 s ± 0.066 s [User: 0.920 s, System: 0.265 s]
Range (min … max): 1.132 s … 1.310 s 10 runs
Benchmark 3: target/release-with-debug/jj-3 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
Time (mean ± σ): 909.7 ms ± 46.7 ms [User: 683.6 ms, System: 226.1 ms]
Range (min … max): 868.3 ms … 997.3 ms 10 runs
Relative speed comparison
1.35 ± 0.12 target/release-with-debug/jj-2 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
1.03 ± 0.09 target/release-with-debug/jj-3 -R ~/mirrors/linux --ignore-working-copy log -r "tags(v5)"
```
2025-08-05 01:31:32 +00:00