automerge/rust/automerge
Alex Good 13a775ed9a Speed up loading by generating clocks on demand
Context: currently we store a mapping from ChangeHash -> Clock, where
`Clock` is the set of (ActorId, (Sequence number, max Op)) pairs derived
from the given change and it's dependencies. This clock is used to
determine what operations are visible at a given set of heads.

Problem: populating this mapping for documents with large histories
containing many actors can be very slow as for each change we have to
allocate and merge a bunch of hashmaps.

Solution: instead of creating the clocks on load, create an adjacency
list based representation of the change graph and then derive the clock
from this graph when it is needed. Traversing even large graphs is still
almost as fast as looking up the clock in a hashmap.
2023-02-03 16:15:15 +00:00
..
benches automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
examples automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
fuzz Add Fuzz Testing (#498) 2023-01-25 16:03:05 +00:00
src Speed up loading by generating clocks on demand 2023-02-03 16:15:15 +00:00
tests automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
.gitignore Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
Cargo.toml Only observe the current state on load 2023-02-03 10:01:12 +00:00
README.md automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00

Automerge

Automerge is a library of data structures for building collaborative local-first applications. This is the Rust implementation. See automerge.org