Skip to content

make laziness dynamic based on usage #3

@ldanilek

Description

@ldanilek

Currently the tree has a lazy root by default, which reduces contention when modifications are random. But if modifications are always at the end of the tree, or clustered in a single subtree, we are back to serializing all writes.

To fix this, we should make inner nodes become lazy dynamically when they are being written too quickly. Something like this:

https://stack.convex.dev/rate-limiting

And then if the node isn't written to for a while, we can make it non-lazy again.

Potentially we would want a cron to make it non-lazy in case there are a ton of writes all at once and then a read-heavy workload afterwards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions