jj/lib/Cargo.toml
Waleed Khan 84f807d222 working_copy: traverse filesystem in parallel
This improves `jj status` time by a factor of ~2x on my machine (M1 Macbook Pro 2021 16-inch, uses an SSD):

```sh
$ hyperfine --parameter-list hash before,after --parameter-list repo nixpkgs,gecko-dev --setup 'git checkout {hash} && cargo build --profile release-with-debug' --warmup 3 './target/release-with-debug/jj -R ../{repo} st'
Benchmark 1: ./target/release-with-debug/jj -R ../nixpkgs st (hash = before)
  Time (mean ± σ):      1.640 s ±  0.019 s    [User: 0.580 s, System: 1.044 s]
  Range (min … max):    1.621 s …  1.673 s    10 runs

Benchmark 2: ./target/release-with-debug/jj -R ../nixpkgs st (hash = after)
  Time (mean ± σ):     760.0 ms ±   5.4 ms    [User: 812.9 ms, System: 2214.6 ms]
  Range (min … max):   751.4 ms … 768.7 ms    10 runs

Benchmark 3: ./target/release-with-debug/jj -R ../gecko-dev st (hash = before)
  Time (mean ± σ):     11.403 s ±  0.648 s    [User: 4.546 s, System: 5.932 s]
  Range (min … max):   10.553 s … 12.718 s    10 runs

Benchmark 4: ./target/release-with-debug/jj -R ../gecko-dev st (hash = after)
  Time (mean ± σ):      5.974 s ±  0.028 s    [User: 5.387 s, System: 11.959 s]
  Range (min … max):    5.937 s …  6.024 s    10 runs

$ hyperfine --parameter-list repo nixpkgs,gecko-dev --warmup 3 'git -C ../{repo} status'
Benchmark 1: git -C ../nixpkgs status
  Time (mean ± σ):     865.4 ms ±   8.4 ms    [User: 119.4 ms, System: 1401.2 ms]
  Range (min … max):   852.8 ms … 879.1 ms    10 runs

Benchmark 2: git -C ../gecko-dev status
  Time (mean ± σ):      2.892 s ±  0.029 s    [User: 0.458 s, System: 14.244 s]
  Range (min … max):    2.837 s …  2.934 s    10 runs
```

Conclusions:

- ~2x improvement from previous `jj status` time.
- Slightly faster than Git on nixpkgs.
- Still 2x slower than Git on gecko-dev, not sure why.

For reference, Git's default number of threads is defined in the `online_cpus` function: ee48e70a82/thread-utils.c (L21-L66). We are using whatever the Rayon default is.
2023-08-03 18:20:49 +00:00

77 lines
1.8 KiB
TOML

[package]
name = "jj-lib"
version = "0.8.0"
authors = ["Martin von Zweigbergk <martinvonz@google.com>"]
edition = "2021"
rust-version = "1.71"
license = "Apache-2.0"
description = "Library for Jujutsu (an experimental VCS)"
homepage = "https://github.com/martinvonz/jj"
repository = "https://github.com/martinvonz/jj"
documentation = "https://docs.rs/jj-lib"
readme = "../README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[[bench]]
name = "diff_bench"
harness = false
[build-dependencies]
version_check = "0.9.4"
[dependencies]
backoff = "0.4.0"
blake2 = "0.10.6"
byteorder = "1.4.3"
bytes = "1.4.0"
chrono = { version = "0.4.26", default-features = false, features = [
"std",
"clock",
] }
config = { version = "0.13.3", default-features = false, features = ["toml"] }
digest = "0.10.7"
git2 = "0.17.2"
hex = "0.4.3"
itertools = "0.11.0"
maplit = "1.0.2"
once_cell = "1.18.0"
pest = "2.7.2"
pest_derive = "2.7.2"
prost = "0.11.9"
rand = "0.8.5"
rand_chacha = "0.3.1"
rayon = "1.7.0"
regex = "1.9.1"
serde_json = "1.0.104"
smallvec = { version = "1.11.0", features = [
"const_generics",
"const_new",
"union",
] }
strsim = "0.10.0"
tempfile = "3.7.0"
thiserror = "1.0.44"
tokio = { version = "1.29.1", optional = true }
tracing = "0.1.37"
watchman_client = { version = "0.8.0", optional = true }
whoami = "1.4.1"
zstd = "0.12.4"
[target.'cfg(unix)'.dependencies]
rustix = { version = "0.38.6", features = ["fs"] }
[dev-dependencies]
assert_matches = "1.5.0"
criterion = "0.5.1"
esl01-renderdag = "0.3.0"
insta = "1.31.0"
num_cpus = "1.16.0"
test-case = "3.1.0"
testutils = { path = "testutils" }
[features]
default = []
vendored-openssl = ["git2/vendored-openssl"]
watchman = ["dep:tokio", "dep:watchman_client"]