bevy/crates/bevy_ecs/src
Paweł Grabarz 052094757a reduce tricky unsafety and simplify table structure (#2221)
I've noticed that we are overusing interior mutability of the Table data, where in many cases we already own a unique reference to it. That prompted a slight refactor aiming to reduce number of safety constraints that must be manually upheld. Now the majority of those are just about avoiding bound checking, which is relatively easy to prove right.

Another aspect is reducing the complexity of Table struct. Notably, we don't ever use archetypes stored there, so this whole thing goes away. Capacity and grow amount were mostly superficial, as we are already using Vecs inside anyway, so I've got rid of those too. Now the overall table capacity is being driven by the internal entity Vec capacity. This has a side effect of automatically implementing exponential growth pattern for BitVecs reallocations inside Table, which to my measurements slightly improves performance in tests that are heavy on inserts. YMMV, but I hope that those tests were at least remotely correct.
2021-05-24 23:21:19 +00:00
..
component Improve bevy_ecs query docs (#1935) 2021-04-22 19:09:09 +00:00
entity Improve bevy_ecs query docs (#1935) 2021-04-22 19:09:09 +00:00
query small ecs cleanup and remove_bundle drop bugfix (#2172) 2021-05-18 19:25:57 +00:00
schedule small ecs cleanup and remove_bundle drop bugfix (#2172) 2021-05-18 19:25:57 +00:00
storage reduce tricky unsafety and simplify table structure (#2221) 2021-05-24 23:21:19 +00:00
system Expose set_changed() on ResMut and Mut (#2208) 2021-05-18 19:25:58 +00:00
world reduce tricky unsafety and simplify table structure (#2221) 2021-05-24 23:21:19 +00:00
archetype.rs small ecs cleanup and remove_bundle drop bugfix (#2172) 2021-05-18 19:25:57 +00:00
bundle.rs reduce tricky unsafety and simplify table structure (#2221) 2021-05-24 23:21:19 +00:00
event.rs Optimize Events::extend and impl std::iter::Extend (#2207) 2021-05-19 18:41:46 +00:00
lib.rs Use bevy_reflect as path in case of no direct references (#1875) 2021-05-19 19:03:36 +00:00
reflect.rs Reliable change detection (#1471) 2021-03-19 17:53:26 +00:00