Commit graph

8 commits

Author SHA1 Message Date
Andrew Jeffery
d3783b6a94 Sync perf 2022-02-18 08:47:27 -08:00
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
Andrew Jeffery
94769e2dae
Sequence tree (#236)
Switch from im_rc to `SequenceTree`
2021-09-14 13:38:15 +01:00
Andrew Jeffery
990d2bb4f3
Reduce deflate compression on the hot path (#186) 2021-07-13 11:04:39 +01:00
Andrew Jeffery
fc1b8f87fb
Use SmolStr in place of String (#182)
Most of the strings are small and so fit nicely in a SmolStr. When they
don't it just reverts to using a normal String.
2021-06-19 16:28:51 +01:00
Andrew Jeffery
79239cc6a4
Improve load performance when no cursors are present (#171)
* Add save and load to benchmarks

* Improve load performance when no cursors are found
2021-06-16 11:50:49 +01:00
Andrew Jeffery
14af0738dd
Remove MapType from Map and add Table variant (#168)
This simplifies the Value enum and hides the protocol internals from the
variants.
2021-06-14 21:26:02 +01:00
Andrew Jeffery
a6e955abfd
Rework statetree to be a tree (#156) 2021-06-14 11:08:14 +01:00