All Posts
Stories and architecture notes, newest stories first.
Column-Level Reactivity
Column-level dependency tracking moves stream invalidation from broad table wakeups toward query-aware dispatch, while table-level invalidation remains the correctness fallback.
Debugging a Dart VM Service Deadlock
A cold-launch freeze first looked like a database migration hang, but native stack sampling showed the process blocked inside a Dart VM service deadlock.
Optimization After the Read Path Stabilized
Once the main read-path architecture was stable, later experiments focused on stream fanout, write-path allocation, benchmark coverage, and reusable research records.
Writer Isolate and Invalidation Data
The persistent writer isolate serialized SQLite mutations, preserved transaction state, and produced the dirty-table data used by reactive queries.
Stream Invalidation Becomes a Subsystem
Reactive queries required their own invalidation engine once dependency capture, dirty-table dispatch, deduplication, and stale-result handling became shared concerns.
Persistent Reader Pool Design
After the row representation improved, small reads were dominated by isolate setup, so resqlite moved to persistent reader workers with a separate large-result transfer path.
Flat-List ResultSet Design
resqlite's row representation changed from per-row
LinkedHashMap instances to a shared schema plus one flat value list, reducing transfer-graph size while preserving the map API.
Result Representations That Did Not Work
Several plausible row-transfer strategies were rejected because they improved the wrong metric or moved expensive work back onto the UI isolate.
Understanding Dart Isolate Transfer Costs
Isolate.exit() avoided copying rows, but benchmark breakdowns showed that validating a large Dart object graph was still a major cost.
Why resqlite Started
resqlite began as a Flutter SQLite library shaped by one product constraint: keep database work from stealing frame time while preserving ordinary SQLite ergonomics and reactive queries.
resqlite Architecture
resqlite is a high-performance SQLite library for Dart built on raw C FFI (Foreign Function Interface — how Dart calls native C code). It's designed around a single principle: minimize main-isola...