rspace-online/shared/local-first
Jeff Emmett 63ac2a268e perf: parallelize local-first init — batch IDB loads, cache crypto keys, preload sync states
Sequential document loading during init() was the main bottleneck: each cached
doc required a serial IDB read + key derivation + decryption + Automerge.load.
With N documents this meant N× single-doc latency instead of 1×.

Changes:
- Add loadMany() to EncryptedDocStore for parallel Promise.all() batch loading
- Cache derived space/doc CryptoKeys in DocCrypto (one derivation per session)
- Add preloadSyncStates() to DocSyncManager for parallel sync state loading
- Update all 11 module local-first-client init() methods to use batch APIs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 14:18:55 -08:00
..
backup.ts feat: layered local-first data architecture — encrypted backup, relay persistence, at-rest encryption 2026-03-02 17:09:07 -08:00
compute.ts Add 7-layer local-first data infrastructure 2026-02-23 01:12:06 +00:00
crypto.ts perf: parallelize local-first init — batch IDB loads, cache crypto keys, preload sync states 2026-03-03 14:18:55 -08:00
document.ts Add 7-layer local-first data infrastructure 2026-02-23 01:12:06 +00:00
encryptid-bridge.ts feat: layered local-first data architecture — encrypted backup, relay persistence, at-rest encryption 2026-03-02 17:09:07 -08:00
index.ts feat: layered local-first data architecture — encrypted backup, relay persistence, at-rest encryption 2026-03-02 17:09:07 -08:00
memory-card.ts Add 7-layer local-first data infrastructure 2026-02-23 01:12:06 +00:00
query.ts Add 7-layer local-first data infrastructure 2026-02-23 01:12:06 +00:00
storage.ts perf: parallelize local-first init — batch IDB loads, cache crypto keys, preload sync states 2026-03-03 14:18:55 -08:00
sync.ts perf: parallelize local-first init — batch IDB loads, cache crypto keys, preload sync states 2026-03-03 14:18:55 -08:00