Learn/Open SourceDigital FreedomDistributed Cloud

SpaceDB 0.7 Does The Same Work In Far Fewer Instructions

SpaceDB 0.7 is a performance release of the local-first database. Eight drivers fell from 5,702 million instructions to 2,378 million, results unchanged.

Signed by M·
Silver laptop with a dark terminal on a sunlit oak desk, next to a linen notebook and a wooden pencil
What did SpaceDB 0.7 change?

SpaceDB 0.7 keeps the same driver results and spends fewer instructions. Eight drivers together fell from 5,702 million instructions to 2,378 million, a 58.3 percent drop.

SpaceDB 0.7 is the performance release of the local-first database. The published crate is spacedb-sdk 0.7.0, on crates.io since 10 October 2026. Each driver still prints the same results. The instruction count for that work went down.

What SpaceDB is is the earlier page: a CRDT-native database whose replica is the device, with no data center in the middle. This page is the speed of that same database. The measurement table and the drivers live in the SpaceDB repository.

Trust is a result you can re-run. Security is a replica that still encrypts on the device. Incentive is the same job costing fewer instructions, so a home machine can keep the database. The Electronic Frontier Foundation has documented what happens when the database is someone else's server. SpaceDB 0.7 keeps that boundary on the device and makes the local side cheaper to run.

Eight drivers, measured together, fell from 5,702 million instructions to 2,378 million. That is a 58.3 percent drop on the SpaceDB performance release. A change stayed in the tree only when the count went down and the driver's printed values stayed identical.

What The SpaceDB 0.7 Counts Actually Say

The measurement is callgrind's instruction count, Ir, on a release build. Two runs of the same binary match. Valgrind's callgrind manual is the tool. Each crate ships a driver, examples/ir_*.rs, that does fixed work and prints values that change if the work changes. Refuted changes were reverted, and the number that refuted them stayed on the record.

| Driver | 0.6.0 | SpaceDB 0.7 | Change | | --- | --- | --- | --- | | ir_sdk, authorize + write + read, 330 ops | 1,136.6M | 12.2M | -98.9% | | ir_access, authorize, delegation, audit log | 1,362.5M | 95.6M | -93.0% | | ir_query, WASM map-reduce + host call | 280.9M | 33.4M | -88.1% | | ir_vector, 1,500 x 64-d, three metrics, top-10 | 204.2M | 33.1M | -83.8% | | ir_crdt, every CRDT type + sealed persistence | 199.8M | 151.1M | -24.4% | | ir_sim, 40-replica gossip, causal, quorum, churn | 2,060.5M | 1,663.3M | -19.3% | | ir_durability, erasure encode + reconstruct | 40.6M | 33.1M | -18.6% | | ir_store, sealed puts, gets, ranges | 416.9M | 356.1M | -14.6% | | All eight | 5,702M | 2,378M | -58.3% |

The operator console driver, ir_console, arrived with this release. It went from 91.0 million instructions to 82.9 million, an 8.8 percent drop, and that figure is the code change ahead of the build-profile change. It sits outside the eight.

Where The SpaceDB Performance Release Spent Fewer Instructions

Five kinds of waste came out, largest first. Work that used to happen on every call now happens once. A search that used to sort the whole index now keeps the top k. Updates nobody read stopped being re-encoded. Copies across seams became moves. In the MATA monorepo the native release build of these crates uses opt-level = 3. The web build stays size-tuned. Embedders choose their own profile. The table above includes that build change, so a project on a different profile will see a different share of the drop.

The SpaceDB 0.7 SDK Stopped Repeating The Same Check

Compiled WASM modules are cached by workload hash. An SDK session verifies its capability signature once, and checks again only if the issuer's published key changes. Signatures already verified are remembered for the process: the cache is bounded, it stores successes only, and the key is a BLAKE3 of the key, the message, and the signature. Erasure coders are built once per geometry. A range scan builds one cipher.

That is the SDK driver: 330 authorize, write, and read operations, from 1,136.6 million instructions to 12.2 million, a 98.9 percent drop. Access, which walks authorization, delegation chains, and the audit log, fell from 1,362.5 million to 95.6 million, a 93.0 percent drop. The query driver, WASM map-reduce plus the host-call function, fell from 280.9 million to 33.4 million, an 88.1 percent drop.

The NIST Zero Trust Architecture treats every device as its own boundary. A check that was correct the first time stays correct when the process remembers it. A tampered audit entry is still verified in full. The cache stores successes.

Vector Search In The SpaceDB Performance Release

Vector insert is O(1) by id. The previous path scanned the index to find the row. Search selects the top k and leaves the rest of the index unsorted.

The vector driver is 1,500 vectors of 64 dimensions, three distance metrics, top-10. It fell from 204.2 million instructions to 33.1 million, an 83.8 percent drop. The query goes in. The top-k comes out. The corpus stays on the node. That is the same privacy shape as RAG Converter, which turns a file into chunks on the machine that holds the file, and as the article on converting business files to private RAG. The SpaceDB performance release makes the on-node index cheaper and keeps the corpus where it already was.

Copies The SpaceDB 0.7 Release Stopped Making

Remote CRDT updates stay in the update log that already holds them, so the release stopped re-encoding them on the way in. A document that never relays raw updates can opt out with CrdtDoc::new_unlogged. Rows are sealed and opened in place. Byte strings serialize as one copy through the Bytes type. Buffers move across the engine, the shard store, and the transport seam.

Those cuts are smaller than the cache, and they are on the record. The CRDT driver fell 24.4 percent, from 199.8 million instructions to 151.1 million. The store driver, sealed puts, gets, and ranges, fell 14.6 percent, from 416.9 million to 356.1 million. Erasure encode and reconstruct fell 18.6 percent, from 40.6 million to 33.1 million. The simulator, 40-replica gossip with causal delivery, quorum, and churn, fell 19.3 percent, from 2,060.5 million to 1,663.3 million.

rusty_alloc is still the allocator spacedb-sdk installs by default. A library that embeds the SDK should set default-features = false so the application keeps the one global allocator.

What SpaceDB 0.7 Still Promises

The shape of the database is the same one in the local-first SpaceDB article. A write still commits on the device. A schema still picks a CRDT type and a consistency tier per field. A capability is still signed, scoped, expiring, and revocable, for a person or an agent. The local distributed Firebase alternative is that model. The challenges of Firebase when the network drops are the failure this database was built to avoid. SpaceDB 0.7 makes the local path cheaper. The distributed cloud is still the set of machines people already own.

The Federal Trade Commission has described how a broker's copy of a record becomes the product. A faster local database is the Incentive. The record staying on the device is Trust and Security. The Freedom Guide is the walkthrough for bringing that record home.

Two Behaviors SpaceDB 0.7 Changed On Purpose

CrdtStore::contains is a presence check. The vault can stay locked. The document stays sealed. Answering whether the document is there leaves the ciphertext closed, and the check does not decrypt it.

Signature verification is cached per process. A log walk skips a signature the same process just produced in AuditLog::record. A tampered entry is still verified in full. Those two changes are the behavior delta. Every other driver was required to print the same values it printed on 0.6.0.

New Surfaces In The SpaceDB Performance Release

The new API is additive. Bytes. Collection::contains_key. Collection<K, Bytes>::get_with. WriteTx::put_raw_owned. HeldCapability. KeyDirectory::published_key_is. CrdtDoc::new_unlogged. CrdtDoc::caught_up_state_vector. SyncMessage::decode_ref and into_frame. Transport::send_owned. ShardStore::put_owned and len_of. New trait methods have default implementations, so an existing implementor still compiles.

The public record of what just landed is Future Web News. The crates belong to the Remade with Rust catalog, and the reason that catalog exists is the importance of Remade with Rust.

How To Reproduce The SpaceDB 0.7 Instruction Counts

On Linux, with valgrind:

cargo build --release --example ir_access -p spacedb-access
valgrind --tool=callgrind target/release/examples/ir_access

Counts match run to run once randomness is pinned. The drivers seed the CRDT engine's id generator. A measurement run answers getrandom deterministically, through an LD_PRELOAD shim, so hash seeds, nonces, and test keys repeat. The same recipe covers the other ir_* examples.

Memory-safe Rust is why this database can sit on a machine the operator does not fully control. That argument is why a distributed cloud needs memory-safe Rust. SpaceDB 0.7 is that database, measured, with the repeated work taken out.

FAQ

Short answers already in this article.

How were the SpaceDB 0.7 instruction counts measured?

The SpaceDB 0.7 counts are callgrind Ir on a release build. Each driver does fixed work and prints values that change if the work changes. A change stayed only when the count went down and those values stayed identical.

Which SpaceDB 0.7 driver fell the furthest?

The SDK driver fell the furthest. Authorize, write, and read across 330 operations went from 1,136.6 million instructions to 12.2 million, a 98.9 percent drop, with the same printed results.

Does SpaceDB 0.7 still commit a write on the device?

A SpaceDB 0.7 write still commits on the device. A schema still picks a CRDT type and a consistency tier per field. A capability is still signed, scoped, expiring, and revocable.

What does CrdtStore contains do in SpaceDB 0.7?

CrdtStore contains in SpaceDB 0.7 is a presence check. The vault can stay locked. The document stays sealed. The check leaves the ciphertext closed and does not decrypt it.

How do I reproduce a SpaceDB 0.7 callgrind count?

On Linux, build the release example and run valgrind --tool=callgrind. The drivers seed the CRDT id generator, and a measurement run answers getrandom through an LD_PRELOAD shim so the count repeats.