I have a storage for yjs that does not guarantee that every item is read in the order it happened. For example, I have updates that happened in the following order:
update1
update2
update3
but they are read by Yjs in this order:
update3
update1
update2
It looks like Yjs is able to deal with this. My question is: are there any performance issues or limitations in such situations that need to be taken into account?
There are probably some ways to optimize it, but generally I would rather try that structs by the same client are applied in-order.
Btw, you can apply structs by different clients out-of-order with very little performance impact. Yjs computes a unique path to apply all structs to the model. If structs are missing (because the struct that you currently want to execute depends on another struct), it will pause the integration process until the missing struct is found. More on this here: https://github.com/yjs/yjs/blob/f4c919d9ec70f6c7eadc35d6758f1b8b35459d8e/src/utils/encoding.js#L159