##// END OF EJS Templates
rust-nodemap: pure Rust example...
rust-nodemap: pure Rust example To run, use `cargo run --release --example nodemap` This demonstrates that simple scenarios entirely written in Rust can content themselves with `NodeTree<T>`. The example mmaps both the nodemap file and the changelog index. We had of course to include an implementation of `RevlogIndex` directly, which isn't much at this stage. It felt a bit prematurate to include it in the lib. Here are some first performance measurements, obtained with this example, on a clone of mozilla-central with 440000 changesets: (create) Nodemap constructed in RAM in 153.638305ms (query CAE63161B68962) found in 22.362us: Ok(Some(269489)) (bench) Did 3 queries in 36.418µs (mean 12.139µs) (bench) Did 50 queries in 184.318µs (mean 3.686µs) (bench) Did 100000 queries in 31.053461ms (mean 310ns) To be fair, even between bench runs, results tend to depend whether the file is still in kernel caches, and it's not so easy to get back to a real cold start. The worst we've seen was in the 50us ballpark. In any busy server setting, the pages would always be in RAM. We hope it's good enough not to be significantly slower on any concrete Mercurial operation than the C nodetree when fully in RAM, and of course this implementation has the serious headstart advantage of persistence. Differential Revision: https://phab.mercurial-scm.org/D7797

File last commit:

r44870:8f7c6656 default
r44870:8f7c6656 default
Show More
Cargo.toml
36 lines | 700 B | text/plain | TOMLLexer
Georges Racinet
rust: pure Rust lazyancestors iterator...
r40307 [package]
name = "hg-core"
version = "0.1.0"
authors = ["Georges Racinet <gracinet@anybox.fr>"]
description = "Mercurial pure Rust core library, with no assumption on Python bindings (FFI)"
Raphaël Gomès
rust: switch hg-core and hg-cpython to rust 2018 edition...
r42828 edition = "2018"
Raphaël Gomès
rust-re2: add wrapper for calling Re2 from Rust...
r44786 build = "build.rs"
Georges Racinet
rust: pure Rust lazyancestors iterator...
r40307
[lib]
name = "hg"
Georges Racinet
rust: translated random test of missingancestors...
r41841
Raphaël Gomès
rust-dirstate: add rust implementation of `parse_dirstate` and `pack_dirstate`...
r42488 [dependencies]
Raphaël Gomès
rust-filepatterns: add a Rust implementation of pattern-related utils...
r42514 byteorder = "1.3.1"
Georges Racinet
rust-node: binary Node ID and conversion utilities...
r44601 hex = "0.4.0"
Raphaël Gomès
rust-filepatterns: add a Rust implementation of pattern-related utils...
r42514 lazy_static = "1.3.0"
Raphaël Gomès
rust-re2: add wrapper for calling Re2 from Rust...
r44786 libc = { version = "0.2.66", optional = true }
Augie Fackler
rust: sort dependencies entries in Cargo.toml...
r42518 memchr = "2.2.0"
Raphaël Gomès
rust-dependencies: pin the dependencies of hg-core to prevent breakage...
r43530 rand = "0.6.5"
rand_pcg = "0.1.1"
Raphaël Gomès
rust-dependencies: update rayon...
r44618 rayon = "1.3.0"
Raphaël Gomès
rust-dependencies: pin the dependencies of hg-core to prevent breakage...
r43530 regex = "1.1.0"
Raphaël Gomès
rust-performance: introduce FastHashMap type alias for HashMap...
r44278 twox-hash = "1.5.0"
Raphaël Gomès
rust-utils: add util for canonical path...
r44783 same-file = "1.0.6"
Raphaël Gomès
rust-pathauditor: add Rust implementation of the `pathauditor`...
r44737
[dev-dependencies]
Georges Racinet
rust-nodemap: pure Rust example...
r44870 clap = "*"
memmap = "0.7.0"
pretty_assertions = "0.6.1"
Raphaël Gomès
rust-hg-path: add useful methods to `HgPath`...
r44738 tempfile = "3.1.0"
Raphaël Gomès
rust-re2: add wrapper for calling Re2 from Rust...
r44786
[build-dependencies]
cc = { version = "1.0.48", optional = true }
[features]
default = []
with-re2 = ["cc", "libc"]