surrealdb / surrealkv

A low-level, versioned, embedded, ACID-compliant, key-value database for Rust
https://surrealdb.com
Apache License 2.0
309 stars 18 forks source link

Do not encode index entries in memory #92

Closed gsserge closed 1 month ago

gsserge commented 1 month ago

Use explicit enum IndexValue with the DiskIndexEntry and MemIndexEntry variants, instead of encoding index values in memory with ValueRef.

As a further optimisation, we could even make struct Indexer generic and parameterise it with either DiskIndexEntry or MemIndexEntry when creating a Store.

Tested with SurrealDB with cargo make ci-api-integration-surrealkv.