Commit graph

3 commits

Author SHA1 Message Date
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
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
a6e955abfd
Rework statetree to be a tree (#156) 2021-06-14 11:08:14 +01:00