📣The December 6th release is out!Read the release notes

    An astronaut standing on a cliff overlooking a space settlement.

    Next stop: memoization station

    TLDR

    We add a memoization system to speed up queries that touch the same data and improve dashboard loading times.

    New optimization for faster, more efficient queries

    We’ve added a new memoization system to the Triplit query engine that should result in faster responses, less memory usage, and a reduction in data sent over the network with some relational queries. In some of our internal benchmark queries we've seen 5-10x performance improvements. Relational queries where the same data is requested multiple times should see the largest speedups.

    const query = client.query('messages').include('sender').build();
    

    In this case, the sender attribute is a relation to a users collection. This new optimization ensures that no repeated work will be done to fetch the same sender multiple times for different messages. e.g. if John is the sender of 10 messages, his user entity will only be fetched once. This doesn't apply just to relations that point to different collections, but also relations that point back to the same collection (i.e. a self join in SQL).

    Dashboard performance fixes and the Triplit Console

    We've seen some long load times for projects in the Triplit dashboard over the last few weeks that was being caused by a 3rd-party API. We've addressed this by loading data for the dashboard more lazily, which should result in faster load times for all users. Within the dashboard, we've made improvements to the Triplit console and fixed some bugs.

    Other improvements

    We've released a number of improvements to the developer experience across the Triplit platform, including:

    • Better error messages when running seed commands like npx triplit seed run or npx triplit dev --seed
    • Simpler internal types for Triplit schemas, which should make it easier for contributor to extend the Triplit codebase
    • Truncated logs for large payloads on the Triplit server