diff --git a/.changeset/zero-rust-faster-launch.md b/.changeset/zero-rust-faster-launch.md deleted file mode 100644 index ec9ce2e9dd..0000000000 --- a/.changeset/zero-rust-faster-launch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'zero-rust': patch ---- - -`Zero::new` takes less time on a replica of thousands of rows: on a Mac, 19.0 ms instead of 23.0 ms for 8,000 rows, and 7.0 ms instead of 7.6 ms for 2,000. The replica goes into the query sources without a diff against an empty one, the first report of its queries and mutation results reads only those keys, and a diff of two whole copies of the replica walks them once instead of sorting their keys. diff --git a/.changeset/zero-rust-prepare.md b/.changeset/zero-rust-prepare.md deleted file mode 100644 index 9d017756b5..0000000000 --- a/.changeset/zero-rust-prepare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'zero-rust': minor ---- - -`Zero::prepare(schema, context, mutators, options)` opens the client's SQLite store and reads its replica on a thread of its own, and `Zero::from_prepared(prepared, scheduler, socket_factory)` makes the client from it on the app's thread. Call `prepare` as early as the app knows its options, and `from_prepared` where the first frame needs the client: it waits for whatever is left, and the client and its views have their rows at once, as with `Zero::new`. At launch, Zero then takes 5.6 ms of the app's thread on a Mac for a replica of 8,000 rows instead of 17.8 ms, and 2.8 ms instead of 7.1 ms for 2,000. Loading the replica into the query sources and hydrating the first views stay on the app's thread. `Zero::new` and `materialize` don't change. diff --git a/.changeset/zero-swift-faster-launch.md b/.changeset/zero-swift-faster-launch.md deleted file mode 100644 index 69c93c7932..0000000000 --- a/.changeset/zero-swift-faster-launch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'zero-swift': patch ---- - -Opening a client takes less of the main thread before the app's first frame: a third less for a replica of about 2,000 rows (on a Mac, 10.9 ms instead of 15.6 ms; on the iOS Simulator, 20.4 ms instead of 26.2 ms), and 40% less for 8,000 rows. The replica goes into the query sources without a diff against an empty one, and the first report of its queries and mutation results reads only those keys. The URLSession is made by the first connect, the network monitor starts on its own queue, and the storage folder is excluded from backups in the background. diff --git a/.changeset/zero-swift-prepare.md b/.changeset/zero-swift-prepare.md deleted file mode 100644 index d716e1dcd3..0000000000 --- a/.changeset/zero-swift-prepare.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'zero-swift': minor ---- - -`Zero.prepare(schema:context:mutators:options:queries:)` opens the client's store, reads its replica, and hydrates the queries the app's first frame shows, off the main actor, and `Zero(prepared)` takes the result over on the main actor. Call `prepare` as early as the app knows its options, such as in `App.init`, and make the client where the first frame needs it: it waits for whatever is left, and the views of the prepared queries have their rows at once, as with `Zero.init`. At launch, Zero then takes about 2 ms of the main thread on a Mac however large the replica is, instead of 10 ms for a replica of 2,000 rows and 25 ms for 8,000. `Zero.init` and `materialize` don't change. diff --git a/apps/zbugs-gpui/Cargo.lock b/apps/zbugs-gpui/Cargo.lock index d21a2f673a..45fc11411e 100644 --- a/apps/zbugs-gpui/Cargo.lock +++ b/apps/zbugs-gpui/Cargo.lock @@ -9312,7 +9312,7 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zero-client" -version = "0.4.0" +version = "0.5.0" dependencies = [ "rusqlite", "serde", diff --git a/apps/zbugs-model/Cargo.lock b/apps/zbugs-model/Cargo.lock index e8726207e3..31909f4759 100644 --- a/apps/zbugs-model/Cargo.lock +++ b/apps/zbugs-model/Cargo.lock @@ -107,7 +107,7 @@ dependencies = [ [[package]] name = "zero-client" -version = "0.4.0" +version = "0.5.0" dependencies = [ "serde", ] diff --git a/apps/zbugs-rune/Cargo.lock b/apps/zbugs-rune/Cargo.lock index 4ec024de57..d7b8ae126c 100644 --- a/apps/zbugs-rune/Cargo.lock +++ b/apps/zbugs-rune/Cargo.lock @@ -4914,7 +4914,7 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zero-client" -version = "0.4.0" +version = "0.5.0" dependencies = [ "futures-util", "rusqlite", diff --git a/packages/zero-rust-cli/CHANGELOG.md b/packages/zero-rust-cli/CHANGELOG.md index 685dff90d0..ab5fda9c07 100644 --- a/packages/zero-rust-cli/CHANGELOG.md +++ b/packages/zero-rust-cli/CHANGELOG.md @@ -1,5 +1,15 @@ # zero-rust +## 0.5.0 + +### Minor Changes + +- 607f99d: `Zero::prepare(schema, context, mutators, options)` opens the client's SQLite store and reads its replica on a thread of its own, and `Zero::from_prepared(prepared, scheduler, socket_factory)` makes the client from it on the app's thread. Call `prepare` as early as the app knows its options, and `from_prepared` where the first frame needs the client: it waits for whatever is left, and the client and its views have their rows at once, as with `Zero::new`. At launch, Zero then takes 5.6 ms of the app's thread on a Mac for a replica of 8,000 rows instead of 17.8 ms, and 2.8 ms instead of 7.1 ms for 2,000. Loading the replica into the query sources and hydrating the first views stay on the app's thread. `Zero::new` and `materialize` don't change. + +### Patch Changes + +- edec2e7: `Zero::new` takes less time on a replica of thousands of rows: on a Mac, 19.0 ms instead of 23.0 ms for 8,000 rows, and 7.0 ms instead of 7.6 ms for 2,000. The replica goes into the query sources without a diff against an empty one, the first report of its queries and mutation results reads only those keys, and a diff of two whole copies of the replica walks them once instead of sorting their keys. + ## 0.4.0 ### Minor Changes diff --git a/packages/zero-rust-cli/package.json b/packages/zero-rust-cli/package.json index 10da15dd23..42ab5f4837 100644 --- a/packages/zero-rust-cli/package.json +++ b/packages/zero-rust-cli/package.json @@ -1,6 +1,6 @@ { "name": "zero-rust", - "version": "0.4.0", + "version": "0.5.0", "description": "Generates the Rust row types, schema, and query builder of a Zero app for the Zero Rust client.", "license": "Apache-2.0", "repository": { diff --git a/packages/zero-swift-cli/CHANGELOG.md b/packages/zero-swift-cli/CHANGELOG.md index 2a38cf532f..c02ebfa26b 100644 --- a/packages/zero-swift-cli/CHANGELOG.md +++ b/packages/zero-swift-cli/CHANGELOG.md @@ -1,5 +1,15 @@ # zero-swift +## 0.10.0 + +### Minor Changes + +- 73d5f6b: `Zero.prepare(schema:context:mutators:options:queries:)` opens the client's store, reads its replica, and hydrates the queries the app's first frame shows, off the main actor, and `Zero(prepared)` takes the result over on the main actor. Call `prepare` as early as the app knows its options, such as in `App.init`, and make the client where the first frame needs it: it waits for whatever is left, and the views of the prepared queries have their rows at once, as with `Zero.init`. At launch, Zero then takes about 2 ms of the main thread on a Mac however large the replica is, instead of 10 ms for a replica of 2,000 rows and 25 ms for 8,000. `Zero.init` and `materialize` don't change. + +### Patch Changes + +- cd2855b: Opening a client takes less of the main thread before the app's first frame: a third less for a replica of about 2,000 rows (on a Mac, 10.9 ms instead of 15.6 ms; on the iOS Simulator, 20.4 ms instead of 26.2 ms), and 40% less for 8,000 rows. The replica goes into the query sources without a diff against an empty one, and the first report of its queries and mutation results reads only those keys. The URLSession is made by the first connect, the network monitor starts on its own queue, and the storage folder is excluded from backups in the background. + ## 0.9.0 ### Minor Changes diff --git a/packages/zero-swift-cli/package.json b/packages/zero-swift-cli/package.json index dd5e7741aa..48d21ad028 100644 --- a/packages/zero-swift-cli/package.json +++ b/packages/zero-swift-cli/package.json @@ -1,6 +1,6 @@ { "name": "zero-swift", - "version": "0.9.0", + "version": "0.10.0", "description": "Generates the Swift row types and schema of a Zero app for the Zero Swift client.", "license": "Apache-2.0", "repository": { diff --git a/rust/Cargo.lock b/rust/Cargo.lock index aa65812cee..3d76cb57d3 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -669,7 +669,7 @@ dependencies = [ [[package]] name = "zero-client" -version = "0.4.0" +version = "0.5.0" dependencies = [ "futures-util", "rusqlite", @@ -688,7 +688,7 @@ dependencies = [ [[package]] name = "zero-conformance" -version = "0.4.0" +version = "0.5.0" dependencies = [ "zero-client", ] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index bd3e6c1156..1feea3ae36 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -3,14 +3,14 @@ resolver = "3" members = ["zero-client", "conformance", "codegen-tests", "benchmarks"] [workspace.package] -version = "0.4.0" +version = "0.5.0" edition = "2024" rust-version = "1.88" license = "Apache-2.0" repository = "https://github.com/wevm/zero" [workspace.dependencies] -zero-client = { path = "zero-client", version = "0.4.0" } +zero-client = { path = "zero-client", version = "0.5.0" } [workspace.lints.rust] unsafe_code = "forbid" diff --git a/swift/VERSION b/swift/VERSION index ac39a106c4..78bc1abd14 100644 --- a/swift/VERSION +++ b/swift/VERSION @@ -1 +1 @@ -0.9.0 +0.10.0