Zero 1.7

Query Correctness and Performance

Installation

npm install @rocicorp/zero@1.7

Overview

Zero 1.7 focuses on query correctness, performance, and operational safety. It improves consistency with different encodings across Postgres, the SQLite replica, and the in-memory JS query engine, as well as performance improvements under load.

Features

  • Immutable query result updates: Query result updates now preserve references for unchanged subtrees, improving compatibility with React memoization and Solid reactivity without the earlier eager-expansion regression. (#6093)
  • Additional Postgres scalar types: Zero now syncs selected text-represented Postgres scalar types, including network/address types, pg_lsn, and the isn extension family, as string columns. These columns can also participate in Zero primary keys. (#6099)
  • Replication lag diagnostics: Added a replication.last_total_lag gauge so operators can distinguish actual replication lag from a stalled lag-report stream. (#6042)

Performance

We benchmarked zero/v1.6.2 against maint/zero/v1.7 (2698272ca) on an M3 Max MacBook Pro with 36 GB RAM, macOS 26.5.1, and Node 22.22.1. The run used 84 comparable zql-benchmarks cases with the same benchmark definitions on both refs.

Overall, the median benchmark was 1% faster. The geometric mean was 3% slower including one severe planned-exists hydration outlier, or 1% faster excluding that single case. 30 of 84 benchmarks improved by at least 5%, while 22 regressed by at least 5%.

Wins were concentrated in Chinook hydration (+38% geomean), manual flip-join cases (+16%), and in-memory IVM hot-path benchmarks (+5%). Regressions were concentrated in planner hydration, transaction-heavy ArrayView updates, and Chinook push workloads.

Fixes

Breaking Changes

None.