clockworklabs / clockworklabs/SpacetimeDB

btree index performance issue ?

Open
#3,394 2 comments 0 reactions 1 assignee View on GitHub

@joshua-spacetime is already working on this.

Since Oct 15, 2025.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

was asked to make a new issue on discord.

for context :
i'm building an XR app with the Quest 3 that scans the room arround me and send the coordinates of points in the room to SpacetimeDB.
i send 10 points at 10fps and the SpacetimeDB server is supposed to make a fast voxel traversal from the origin of the scan to the points to remove any points in between and then it just adds the point to the db.

capping the distance (from origin to point scanned) to 3 unity distance and knowing that my voxel are size 0.1:
it makes 30 checks per points in a straight line or up to 90 if it's diagonal
for 10 points that makes 900 checks and i measured 10 to 20 deletes and inserts per function call.

The problem is that sometimes, SpacetimeDB takes 4 whole seconds for one execution (10 points) and i don't know why.

I have a testing repo : https://github.com/Frisk197/SaKADo_TEST

This are some results i got after running it for 5 minutes :
Image
one of them executes in 4307ms for no obvious reasons.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.