bevyengine / bevyengine/bevy

`Spawn<B>` now does an unnecssary archetype move / split insert

Open
#20,976 1 comment 0 reactions 0 assignees View on GitHub
A-ECS C-Bug C-Performance D-Complex I-Regression S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

As of https://github.com/bevyengine/bevy/pull/20772, we are now unnecessarily splitting the `spawn((bundle, relationship))` into `spawn(relationship).insert(bundle)`, resulting in an unnecessary archetype move and redundant bookkeeping. This needs to be fixed, as `Spawn` is a high-traffic api.

This points to missing tools in our toolkit!

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the changes in pull request 20772 and tracing the Spawn path for spawn((bundle, relationship)). Confirm where the operation becomes spawn(relationship).insert(bundle), then verify that the completed change avoids the unnecessary archetype move and redundant bookkeeping.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.