Open himself65 opened 1 year ago
Hi @Himself65,
y-indexeddb performs some (non-blocking!) sanity checks at startup. However, the whenSynced
event fires after the sanity checks are performed. I just added a change so that whenSynced
is fired as soon as all updates are retrieved. Now the whenSynced
event fires in 5ms instead of 40ms.
Note that instantiating the y-indexeddb database never blocks the main-thread. However, it requires database access. Please be careful when creating multiple y-indexeddb instances in series. Usually, we only need one. We can only destroy/create a new y-indexeddb provider once all sanity checks are performed.
I'm investigating the benchmark between
y-indexeddb
and our@toverything/y-indexeddb
(not published yet) because of Our application's requirements for the first screen speed.I run some basic bench(not accurate), but it looks like the boost speed when creating multiple persistence is much slower than the package we maintained
Source Code