Skip to content

Conversation

@evntd-jake
Copy link
Contributor

When performance testing, it was found that write latencies linearly increase over time. I'm unable to find any O(n) in the commit code path, my working theory is that the file system operations slow down as the events directory increases in size.

The standard@2 storage impl creates a 0-3 character sub-directory, acting as a bucket and reducing the number of event files stored the single events directory.

The :bucket_length defaults to 2, and depending on the record name encoding this could vary in the number of buckets created. 256 for base16, 1024 for base32, or 4096 for base64url.

When performance testing, it was found that write latencies linearly increase over time. I'm unable to find any O(n) in the commit code path, my working theory is that the file system operations slow down as the events directory increases in size.

The standard@2 storage impl creates a 0-3 character sub-directory, acting as a bucket and reducing the number of event files stored the single events directory.

The :bucket_length defaults to 2, and depending on the record name encoding this could vary in the number of buckets created. 256 for base16, 1024 for base32, or 4096 for base64url.
@evntd-jake evntd-jake merged commit 4ff7c3d into rel/v0.2.0 Jan 20, 2026
9 of 16 checks passed
@evntd-jake evntd-jake deleted the feat/event-buckets branch January 20, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants