Skip to content

Stop sending orphaned entity IDs through ancestor-chain traversal - #25419

Open
tnajdek wants to merge 1 commit into
bevyengine:mainfrom
tnajdek:25416-mark_dirty_trees-skips-live-entities-after-entity-index-reuse
Open

Stop sending orphaned entity IDs through ancestor-chain traversal#25419
tnajdek wants to merge 1 commit into
bevyengine:mainfrom
tnajdek:25416-mark_dirty_trees-skips-live-entities-after-entity-index-reuse

Conversation

@tnajdek

@tnajdek tnajdek commented Aug 15, 2026

Copy link
Copy Markdown

Objective

Solution

Stop sending orphaned entity IDs through ancestor-chain traversal. Unfortunately, that makes the optimized path slightly slower, but still considerably faster than with StaticTransformOptimizations::Disabled.

Testing

Minimal reproduction code: https://gist.github.com/tnajdek/e945d7a6f52db525d46d913e12f89873. Happy to convert this into a regression test.

Disclosure

I've used LLM to research this problem and, partially, to generate the reproduction code.

This change prevents stale IDs from blocking traversal of live entities that reuse the same indices.

Fixes bevyengine#25416
@github-actions

Copy link
Copy Markdown
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨

@JMS55
JMS55 requested a review from aevyrie August 16, 2026 02:08

@alice-i-cecile alice-i-cecile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes please to that regression test :)

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Transform Translations, rotations and scales S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Aug 19, 2026
@alice-i-cecile alice-i-cecile added this to the 0.19.2 milestone Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Transform Translations, rotations and scales C-Bug An unexpected or incorrect behavior S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mark_dirty_trees skips live entities after entity-index reuse

2 participants