Skip to content

v0.5.0

Choose a tag to compare

@danReynolds danReynolds released this 16 Jun 18:45

0.5.0

Performance and reliability release. No breaking changes, and no changes to the
public export surface — safe to upgrade from 0.4.x.

Wins at a glance: up to 45% faster concurrent writes, ~1.8× faster large
selectBytes reads
(>256 KB), faster Row lookups and batch writes, a new
diagnostics counter for silent re-query fallbacks, and a reader-isolate crash fix
for diagnostics() under load.

  • New API: Diagnostics.unknownDependencyFallbackCount — a cumulative counter
    of writes that conservatively re-queried every registered stream because native
    dependency tracking overflowed its caps (or hit OOM). Surfaces workloads silently
    paying full re-query fan-out on every write, which was previously unobservable
    (#151).
  • Bug fix: Database.diagnostics() could intermittently crash a reader isolate
    (SEGV) when polled while readers were mid-query — it toggled SQLite memory
    accounting on live NOMUTEX reader connections. Read workers now bracket each
    request with a real busy guard, and diagnostics reports busy readers as a partial
    snapshot (#156).
  • Performance. Each accepted experiment below; see the interactive benchmark dashboard
    for current cross-library numbers.
    • Writer-request pipelining over a persistent reply port — −36% to −45% on
      concurrent standalone writes (#153,
      exp 159).
    • selectBytes native-view transfer — sends a view over the reader's native
      json_buf instead of taking the sacrifice/respawn path; −44% (~1.8×) on large
      (>256 KB) byte reads, at a bounded ~+15 MB RSS (#169,
      exp 174).
    • Row.containsKey identity fast path — pointer-identity membership scan for
      interned keys on schemas ≤ 32 columns; −23% on the containsKey lane
      (#173,
      exp 176).
    • RowSchema lookup fast path — schema-name identity scan with HashMap
      fallback; ~2× faster main-isolate map consumption at 10K rows
      (#150,
      exp 158).
    • Six-parameter batch packing — extends guarded ASCII batch packing to the
      six-parameter shape; executeBatch p50 88 → 75 µs (#141,
      exp 149).
    • Nullable batch packing — nullable-aware packed batch encoder for first-row
      NULL text columns; nullable ASCII 10k×20 25.7 → 21.7 ms (#145,
      exp 150).

Companion packages released alongside this version: resqlite_vector 0.1.1 and resqlite_js 0.1.1 (now require resqlite: ^0.5.0).