Mimic 0.5.0 - indexes, and queries on Mimic up to 20x faster

GitHub - dragginzgame/mimic: Mimic Dapp Framework - Mimic 0.5.0 is out! Hurray for arbitrary version numbering. As we’re using mimic for our upcoming Toko project it’s getting a lot of attention right now, and much-needed optimisation.

In this release

  • Multiple indexes for each entity. Save and load tested, still working on a QueryPredictor for load. Indexes can be routed to multiple B-Trees

  • Serializer changed from ciborium to minicbor (30% faster), and also got rid of the double serialization (10x faster for large rows!)

  • Account and Subaccount are now first-class primitives

  • Changed to a completely static schema that’s no longer in memory. Only the bits we use get generated. This saves ~300k of memory on Dragginz.

  • Queries have a macro endpoint, so the query is split from the executor. We also support WHERE queries in addition to the offset, limit, sort, and search. Where Queries will use the index when I can work all that out.

  • Sort key is now hashed via xxhash to a u64, so previously comparing ¬30 character strings for SortKeys is so much faster.

Once I get MCP set up I’m going to redo all the documentation, I apologise for the current state of the docs.

Full changelog - mimic/CHANGELOG.md at main · dragginzgame/mimic · GitHub

11 Likes

Just to give you a code example, this is inserting 2000 rows with a 10K blob in each.

2 Likes

Amazing can’t wait to use it :fire:

2 Likes

this is the Toko NFT ledger, with multiple indexes for fast record retrieval

3 Likes