get-convex / get-convex/aggregate

make laziness dynamic based on usage

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
31
Forks
7
Avg merge
8h
Merged PRs (30d)
9

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.