clockworklabs / clockworklabs/SpacetimeDB
Cheap Static/Config data tables
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 25.2k
- Forks
- 1.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 46
Description
Right now it is reasonably expensive to load in physics, terrain, or nav data during a "tick" which is the hottest path. Ideally we have some first-class support for a cheap read-only table that can be initialized at startup. Right now there is the potential to use a const or static but with caveats so having the team support this pattern out of the box would be really valuable.
For example, I have navmesh grid data that is ~8mb. I need to load in ~200 bytes * 9 (for the chunks surround) per moving entity. So if I have 100 players and maybe 1000 monsters running around thats 1,1002009 potentially bytes read every ~100ms when I never need to edit this data.
I can simply add this data into a const and bundle it with the module but it doesn't feel like "the spacetimedb way" of doing things. If something is 100% read only I'd like a way to read that data for close to free instead of the charge at the same rate as hot data.
Requested by @onx2 via the SpacetimeDB site.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by mapping how physics, terrain, or nav data is loaded and charged during a tick, then compare the const/static workaround with startup initialization; done should be a defined first-class read-only table path with near-free reads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100