Skip to content

perf(module): limit creature work to indexed candidates - #711

Merged
Mathih13 merged 2 commits into
mainfrom
perf/simulation-candidates
Oct 16, 2026
Merged

Mathih13 merged 2 commits into
mainfrom
perf/simulation-candidates

Conversation

@Mathih13

@Mathih13 Mathih13 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Creature firings scan WorldEntity rows for regeneration, combat, Characters and pets. Dedicated Instance firings also scan every creature spline, and repeated collision queries decode the same static cells.

Maintain indexed simulation predicates on every Entity insert and update. Select Characters and pets through existing or new indexes, scope splines by Instance, and reuse decoded static collision cells within each firing. Most changed Module files only route Entity writes through the methods that maintain the predicates.

Part 2 of 6. Follows #710. Merged in stack order. Next: #712.

Verification

CI now builds the pinned old Module, populates it, publishes this Module without clearing, and checks preserved state, table schemas, backfill, and native notification delivery.

Two independent adversarial review rounds are complete. No actionable finding remains. The reviewed stack passed offline binding generation, formatting, workspace Clippy with all targets and features, and the Gateway unit and integration test targets. The Gateway binary passed 2,148 tests. Local builds used one job; no local SpacetimeDB instance or load test ran.

All nine checks passed at 9d24f1c4: Module durable tests and Gateway bindings, Runtime Scripts, Rust.

Comment review passed for the final changed source, tests, scripts and configuration. Retained protocol and ordering contracts match the code.

Verification limits

A real build-5875 client and capacity measurements were not run. No capacity gain is claimed.

Risk

Three defaulted columns are appended to WorldEntity, and indexes are added. Creature firings backfill at most 512 rows each and pause their phases until all predicates are current. Other reducers continue. Rehearse that pause on an isolated copy before rollout. Operator SQL that changes the indexed game fields must set simulation_indexed=false. Dynamic GameObject collision stays uncached.

Models: GPT-6 Astra and GPT-6.1 Sol. Harness: Codex in T3 Code.

@Mathih13
Mathih13 force-pushed the perf/simulation-candidates branch from 64abed4 to 9d24f1c Compare October 16, 2026 06:21
@Mathih13
Mathih13 changed the base branch from perf/native-notifications to main October 16, 2026 06:46
@Mathih13
Mathih13 merged commit f7831ff into main Oct 16, 2026
9 of 18 checks passed
@Mathih13

Copy link
Copy Markdown
Contributor Author

Merged after adversarial review and repairs. Added a populated upgrade fixture. It publishes the new Module over the pinned old Module without clearing state, then checks preserved Character and Entity fields, legacy schemas, appended defaults, backfill, and native event delivery.

All nine checks passed at 9d24f1c4: Module durable tests and Gateway bindings, Runtime Scripts, Rust.

Comment review passed. No real-client or capacity measurement is claimed.

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.

1 participant