refactor: optimize query execution and improve change tracking
- Optimize `QueryExecutor` to use the smallest sparse set as a driver for multi-component queries, reducing iteration overhead. - Implement automatic cleanup of unused `Subject` instances in `ChangeBuffer` using a subscriber count. - Improve `ChangeSet` deduplication to correctly handle rapid add/remove transitions for the same component. - Add validation to ensure `IRelationship` components are added to their declared `Source` entity. - Update documentation to reflect correct `Entity` bit layout.
This commit is contained in:
@@ -45,8 +45,8 @@ signature) and sparse sets (one dense array per component type).
|
||||
**Context:** Entities need to be cheap to copy, comparable, and safe against
|
||||
use-after-free (accessing a recycled entity ID).
|
||||
|
||||
**Decision:** `readonly struct Entity` wrapping a `uint`. Upper 24 bits are the
|
||||
ID, lower 8 bits are the version.
|
||||
**Decision:** `readonly struct Entity` wrapping a `uint`. Lower 24 bits are the
|
||||
ID, upper 8 bits are the version.
|
||||
|
||||
**Rationale:**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user