bevyengine / bevyengine/bevy

Modify bevy_ecs to support removing archetypes and unregistering components

Open
#17,564 2 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Feature C-Performance C-Tracking-Issue
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
4d 8m
Merged PRs (30d)
147

Description

As discussed in https://github.com/bevyengine/rfcs/pull/79 and laid out by @james-j-obrien, Bevy's ECS architecture is not optimized for use in worlds with a very large number of archetypes. Fundamentally:

> `bevy_ecs` currently operates under the assumption that archetype and component ids are dense and strictly increasing.

While this is a blocker for efficient implementation of fragmenting / archetypal relations, it's also worth exploring and fixing in its own right.

There are several steps to this:

- [ ] Remove the sparse set in table storage https://github.com/bevyengine/bevy/pull/14928
- [ ] Replace the FixedBitSet in Access / FilteredAccess https://github.com/bevyengine/bevy/pull/16784
- [ ] Implement a component index, which tracks the tables and archetypes each `ComponentId` belongs to as well as the column in that table the id inhabits (if any)
- [ ] Query and system caches need to be easier to access.
- [ ] Query and system caches must be updated to reflect changes to archetypes
- [ ] Create and expose tools for deleting component ids
- [ ] Create and expose tools for deleting archetypes

This is a tracking issue: as more related work comes along, please link it here and bother Alice to update this issue description.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.