[OPTIMIZATION] I/O & Network - Service Worker & Sequential Requests #68

Closed
opened 2026-06-06 20:50:59 +00:00 by Mark · 0 comments
Owner

Medium Issues (2)

  1. Service Worker caches all GET responses without Cache-Control headers or stale-while-revalidate

    • File: public/sw.js:50-72
    • Fix: Add cache expiration (e.g., 24h) + stale-while-revalidate strategy
  2. Sequential IndexedDB queries in utils.ts:267-277 and utils.ts:616-628

    • 3 sequential .toArray() calls for person observations
    • Fix: Promise.all parallel queries
    • Impact: 2-3x faster person observation queries

High Issues (1)

  1. Sequential Preferences.get on app startup (6 calls) - store.ts:1468-1496
    • Fix: Promise.all parallel fetches
    • Impact: 5-6x faster initialization

Low Issues (1)

  1. Sequential Preferences.set in update functions - each called independently
    • Fix: Batch updates or debounce
## Medium Issues (2) 1. **Service Worker caches all GET responses** without Cache-Control headers or stale-while-revalidate - File: `public/sw.js:50-72` - Fix: Add cache expiration (e.g., 24h) + stale-while-revalidate strategy 2. **Sequential IndexedDB queries** in `utils.ts:267-277` and `utils.ts:616-628` - 3 sequential `.toArray()` calls for person observations - Fix: `Promise.all` parallel queries - Impact: 2-3x faster person observation queries ## High Issues (1) 3. **Sequential Preferences.get on app startup** (6 calls) - `store.ts:1468-1496` - Fix: `Promise.all` parallel fetches - Impact: 5-6x faster initialization ## Low Issues (1) 4. **Sequential Preferences.set in update functions** - each called independently - Fix: Batch updates or debounce
Mark 2026-06-13 04:48:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/kimi_agent_kin_app_sync#68
No description provided.