You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently 8 decode workers feed one main thread that writes to 11 SQLite files sequentially. The main thread is the bottleneck.
Proposed architecture: 11 write workers (one per table), each owning its own SQLite connection. Decode workers stream records directly to the appropriate table worker via postMessage, using Bun's zero-copy string fast path (~648ns for any size string).
Currently 8 decode workers feed one main thread that writes to 11 SQLite files sequentially. The main thread is the bottleneck.
Proposed architecture: 11 write workers (one per table), each owning its own SQLite connection. Decode workers stream records directly to the appropriate table worker via postMessage, using Bun's zero-copy string fast path (~648ns for any size string).
Flow:
Benefits:
Considerations:
Ref: Option B from the per-table SQLite design discussion.