-
- Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-ControversialThere is active debate or serious implications around merging this PRThere is active debate or serious implications around merging this PR
Description
relationship requires a more performant and powerful way to manage query's state, as archetype fragmentation becomes prevalent when relationships are used.
This goal can be achieved through 'Query as Entities' – a pattern that selectively exposes new/deleted archetypes only to affected queries requiring iteration over them.
There are some excellent PRs that have tried to implement it for Bevy: #14668 , #18860
Implementation Steps:
- Trigger an event when a new archetype is created.
- Componentize system-internal QueryState.
- Use Observer to manage query entities.
- Type-erased QueryState Component.
- (optional) Provide users with a more ergonomic way to use managed QueryState.
- (optional) To optimize, only notify observers of impacted query entities instead of iterating over every query entity.
MushineLament
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-FeatureA new feature, making something new possibleA new feature, making something new possibleD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!X-ControversialThere is active debate or serious implications around merging this PRThere is active debate or serious implications around merging this PR