Skip to content

Batch Adding and Removing Bodies [SYNTH-253], et al.#1424

Open
azaleacolburn wants to merge 10 commits into
devfrom
colbura/253/optmize-broadphase
Open

Batch Adding and Removing Bodies [SYNTH-253], et al.#1424
azaleacolburn wants to merge 10 commits into
devfrom
colbura/253/optmize-broadphase

Conversation

@azaleacolburn

@azaleacolburn azaleacolburn commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Task

SYNTH-168 (Symptom)
SYNTH-253 (Cause)

Symptom

Spawning fields rapidly causes Jolt to crash. According to Jolt documentation, this can happen when there are too many bodies in the broadphase tree arranged in an unoptimized manner.

Solution

According to the Jolt documentation, there are two ways to ensure optimization, the first is to batch adding bodies, so they can be added and arranged in a more efficient manner. The second is to call OptimizeBroadPhase() on the jolt body interface. There's significant overhead to the second option, and its not recommended with single-threaded Jolt, so instead, we batch adding bodies of a MirabufSceneObject.

Source

Verification

  • Fission builds
  • All tests pass.
  • Performance for fields with many bodies is better on my machine.

Note

Spawning the 2025 field then the 2026 field still causes a memory out of bounds error


Before merging, ensure the following criteria are met:

  • All acceptance criteria outlined in the ticket are met.
  • Necessary test cases have been added and updated.
  • A feature toggle or safe disable path has been added (if applicable).
  • User-facing polish:
    • Ask: "Is this ready-looking?"
  • Cross-linking between Jira and GitHub:
    • PR links to the relevant Jira issue.
    • Jira ticket has a comment referencing this PR.

@azaleacolburn
azaleacolburn requested review from a team as code owners July 17, 2026 17:38
@azaleacolburn
azaleacolburn marked this pull request as draft July 17, 2026 17:50
@azaleacolburn
azaleacolburn marked this pull request as ready for review July 17, 2026 18:26
@azaleacolburn
azaleacolburn requested a review from Copilot July 17, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@azaleacolburn
azaleacolburn requested a review from rutmanz July 17, 2026 18:28
@azaleacolburn
azaleacolburn force-pushed the colbura/253/optmize-broadphase branch from 9d45a77 to d29b4a0 Compare July 17, 2026 18:55
@azaleacolburn
azaleacolburn force-pushed the colbura/253/optmize-broadphase branch from d29b4a0 to 36950f8 Compare July 17, 2026 20:39
@azaleacolburn azaleacolburn self-assigned this Jul 17, 2026
@azaleacolburn azaleacolburn added enhancement physics Relating to either the underlying physics engine or the usage of it refactor The most important part of software development. labels Jul 17, 2026
@azaleacolburn azaleacolburn changed the title Batch Adding and Removing Bodies [SYNTH-253] Batch Adding and Removing Bodies [SYNTH-253] & [SYNTH-168] Jul 17, 2026
@azaleacolburn azaleacolburn changed the title Batch Adding and Removing Bodies [SYNTH-253] & [SYNTH-168] Batch Adding and Removing Bodies [SYNTH-253], et. al. Jul 17, 2026
@azaleacolburn azaleacolburn changed the title Batch Adding and Removing Bodies [SYNTH-253], et. al. Batch Adding and Removing Bodies [SYNTH-253], et al. Jul 17, 2026
@azaleacolburn
azaleacolburn marked this pull request as draft July 20, 2026 14:43
@azaleacolburn
azaleacolburn force-pushed the colbura/253/optmize-broadphase branch from ed14158 to 7a98b9a Compare July 23, 2026 22:26
@azaleacolburn
azaleacolburn marked this pull request as ready for review July 24, 2026 16:08
@azaleacolburn
azaleacolburn requested a review from a team as a code owner July 24, 2026 16:08
@azaleacolburn
azaleacolburn marked this pull request as draft July 24, 2026 16:24
@azaleacolburn
azaleacolburn marked this pull request as ready for review July 24, 2026 16:24
@BrandonPacewic
BrandonPacewic self-requested a review July 24, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physics Relating to either the underlying physics engine or the usage of it refactor The most important part of software development.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants