automerge/perf/Cargo.toml
Andrew Jeffery a76428dfc1 Use vector clock for get_changes
When get_changes has to fall back to get_changes_slow it can be very
slow, having to traverse the entire graph but also suffers from having
to keep track of the seen dependencies in a hashset (which rather
thrashes the memory).

Instead, if we calculate the vector clock for each hash we are given and
take the maximum over those then we can see which changes we need more
easily. In the worst case this still suffers from going through the
entire graph but this could be cached for later use. The worst case is
now when an actor makes a single change right at the start of the
history. In this case we have to go through the entire graph just to
find it and ensure that it is in the closure.
2022-02-18 08:47:27 -08:00

18 lines
501 B
TOML

[package]
name = "perf"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
automerge = { path = "../automerge" }
automerge-backend = { path = "../automerge-backend" }
automerge-frontend = { path = "../automerge-frontend" }
automerge-protocol = { path = "../automerge-protocol" }
rand = "0.8.2"
maplit = "^1.0.2"
unicode-segmentation = "1.7.1"
serde = "1.0.126"
serde_json = "1.0.64"
smol_str = "0.1.17"