While doing some experimentation today, I ran into this behaviour that I found surprising.
When initially syncing data from an indexeddb provider, each update is applied independently. This means any registered subscribers also receive the events one at a time, and can waste a lot of energy in the boot up process. Instead, by wrapping the initialisation in a transaction, I can subscribe to the 'afterTransaction' event, and react only to the final, updated state.
I think maybe if you wait to register subscribers until the document has synced from indexeddb, then this is not an issue, but this change seems very helpful for me.
While doing some experimentation today, I ran into this behaviour that I found surprising.
When initially syncing data from an indexeddb provider, each update is applied independently. This means any registered subscribers also receive the events one at a time, and can waste a lot of energy in the boot up process. Instead, by wrapping the initialisation in a transaction, I can subscribe to the 'afterTransaction' event, and react only to the final, updated state.
I think maybe if you wait to register subscribers until the document has synced from indexeddb, then this is not an issue, but this change seems very helpful for me.