automerge/rust/automerge/src
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
..
automerge Use Automerge::load instead of load_incremental if empty 2023-02-03 10:01:12 +00:00
columnar Add Fuzz Testing (#498) 2023-01-25 16:03:05 +00:00
legacy Ritual obeisance before the altar of clippy 2022-11-05 22:48:43 +00:00
op_observer automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
op_set Only observe the current state on load 2023-02-03 10:01:12 +00:00
op_tree change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
query fix: don't panic when generating parents for hidden objects (#500) 2023-01-19 21:11:36 +00:00
storage Only observe the current state on load 2023-02-03 10:01:12 +00:00
sync automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
transaction Only observe the current state on load 2023-02-03 10:01:12 +00:00
types change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
autocommit.rs refactor: make fields of Automerge private 2023-02-03 10:01:12 +00:00
automerge.rs Speed up loading by generating clocks on demand 2023-02-03 16:15:15 +00:00
autoserde.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
change.rs change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
change_graph.rs Speed up loading by generating clocks on demand 2023-02-03 16:15:15 +00:00
clock.rs Speed up loading by generating clocks on demand 2023-02-03 16:15:15 +00:00
columnar.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
convert.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
decoding.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
error.rs Speed up loading by generating clocks on demand 2023-02-03 16:15:15 +00:00
exid.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
indexed_cache.rs Move rust workspace into ./rust 2022-10-16 19:55:51 +01:00
keys.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
keys_at.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
lib.rs Speed up loading by generating clocks on demand 2023-02-03 16:15:15 +00:00
list_range.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
list_range_at.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
map_range.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
map_range_at.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
op_observer.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
op_set.rs Only observe the current state on load 2023-02-03 10:01:12 +00:00
op_tree.rs change opid to (u32,u32) - 10% performance uptick (#473) 2022-12-11 18:56:20 +00:00
parents.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
query.rs fix: use saturating_sub when updating cached text width (#505) 2023-01-23 19:19:55 +00:00
read.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
sequence_tree.rs automerge-wasm: Use a SequenceTree in the OpObserver 2022-11-22 12:13:42 +00:00
storage.rs Add a method for loading a document without verifying heads 2022-12-19 16:30:14 +00:00
sync.rs Only observe the current state on load 2023-02-03 10:01:12 +00:00
transaction.rs rust: Make fields of Transaction and TransactionInner private 2022-12-02 12:12:54 +00:00
types.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
value.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
values.rs automerge-rs: Introduce ReadDoc and SyncDoc traits and add documentation (#511) 2023-01-30 19:37:03 +00:00
visualisation.rs rewrite opnode to store usize instead of Op (#471) 2022-12-10 10:36:05 +00:00