Skip to content

Commit 35de452

Browse files
authored
Use default storage for TemporaryRenderEntity (#16462)
# Objective `TemporaryRenderEntity` currently uses `SparseSet` storage, but doesn't seem to fit the criteria for a component that would benefit from this. Typical usage of `TemporaryRenderEntity` (and all current usages of it in engine as far as I can tell) would be to spawn an entity with it once and then iterate over it once to despawn that entity. `SparseSet` is said to be useful for insert/removal perf at the cost of iteration perf. ## Solution Use the default table storage ## Testing Possibly this could show up in stress tests like `many_buttons`. I didn't do any benchmarking.
1 parent d928248 commit 35de452

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

crates/bevy_render/src/sync_world.rs

-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ pub type MainEntityHashSet = hashbrown::HashSet<MainEntity, EntityHash>;
166166

167167
/// Marker component that indicates that its entity needs to be despawned at the end of the frame.
168168
#[derive(Component, Copy, Clone, Debug, Default, Reflect)]
169-
#[component(storage = "SparseSet")]
170169
pub struct TemporaryRenderEntity;
171170

172171
/// A record enum to what entities with [`SyncToRenderWorld`] have been added or removed.

0 commit comments

Comments
 (0)