You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Combine added and existing ComponentIds in a single allocation (#21102)
# Objective
Further shrink `ArchetypeAfterBundleInsert`, following #20626.
Remove the need for a `collect()` when triggering `Insert` observers.
## Solution
Combine the `added` and `existing` component id lists into a single
boxed slice. We need to store an additional length to recover the
slices, but this means we store **one** pointer and two lengths instead
of **two** pointers and two lengths, shrinking the size of
`ArchetypeAfterBundleInsert` by one pointer.
This also means we have a slice available for the full list of
`inserted` components without having to copy them into a new `Vec`.
0 commit comments