bevy/crates
James Liu eebf3d61ec
Remove archetype_component_access from QueryState (#12474)
# Objective
`QueryState::archetype_component_access` is only really ever used to
extend `SystemMeta`'s. It can be removed to save some memory for every
`Query` in an app.

## Solution

 * Remove it. 
* Have `new_archetype` pass in a `&mut Access<ArchetypeComponentId>`
instead and pull it from `SystemMeta` directly.
* Split `QueryState::new` from `QueryState::new_with_access` and a
common `QueryState::new_uninitialized`.
* Split `new_archetype` into an internal and public version. Call the
internal version in `update_archetypes`.

This should make it faster to construct new QueryStates, and by proxy
lenses and joins as well.

`matched_tables` also similarly is only used to deduplicate inserting
into `matched_table_ids`. If we can find another efficient way to do so,
it might also be worth removing.

The [generated
assembly](https://github.com/james7132/bevy_asm_tests/compare/main...remove-query-state-archetype-component-access#diff-496530101f0b16e495b7e9b77c0e906ae3068c8adb69ed36c92d5a1be5a9efbe)
reflects this well, with all of the access related updates in
`QueryState` being removed.

---

## Changelog
Removed: `QueryState::archetype_component_access`.
Changed: `QueryState::new_archetype` now takes a `&mut
Access<ArchetypeComponentId>` argument, which will be updated with the
new accesses.
Changed: `QueryState::update_archetype_component_access` now takes a
`&mut Access<ArchetypeComponentId>` argument, which will be updated with
the new accesses.

## Migration Guide
TODO
2024-03-17 19:01:52 +00:00
..
bevy_a11y Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_animation Update to fixedbitset 0.5 (#12512) 2024-03-17 18:43:05 +00:00
bevy_app Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_asset Fix doc comment on AssetActionMinimal (#11105) 2024-03-11 18:59:27 +00:00
bevy_audio Fix leftover references to children when despawning audio entities (#12407) 2024-03-11 18:16:13 +00:00
bevy_color Solve some oklaba inconsistencies (#12526) 2024-03-17 16:24:06 +00:00
bevy_core Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_core_pipeline Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_derive Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_dev_tools Fps overlay (#12382) 2024-03-11 19:26:14 +00:00
bevy_diagnostic Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_dylib Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_dynamic_plugin Document all members of bevy_dynamic_plugin (#12029) 2024-02-22 13:28:52 +00:00
bevy_ecs Remove archetype_component_access from QueryState (#12474) 2024-03-17 19:01:52 +00:00
bevy_ecs_compile_fail_tests Remove APIs deprecated in 0.13 (#11974) 2024-02-19 19:04:47 +00:00
bevy_encase_derive Bump Version after Release (#12020) 2024-02-21 20:58:59 +00:00
bevy_gilrs Send GamepadEvent for gamepads connected at startup (#12424) 2024-03-11 20:05:10 +00:00
bevy_gizmos Gizmo 3d grids (#12430) 2024-03-13 18:51:53 +00:00
bevy_gltf Allow setting RenderAssetUsages for gLTF meshes & materials during load (#12302) 2024-03-12 00:11:01 +00:00
bevy_hierarchy Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_input Add table showing complexity of methods for Input (#10126) 2024-03-10 23:00:20 +00:00
bevy_internal Fix typo in bevy_internal/Cargo.toml (#12535) 2024-03-17 16:21:33 +00:00
bevy_log Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_macro_utils fix deprecations from toml_edit (#12421) 2024-03-11 17:53:38 +00:00
bevy_macros_compile_fail_tests Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
bevy_math Uniform point sampling methods for some primitive shapes. (#12484) 2024-03-17 14:48:16 +00:00
bevy_mikktspace fix some typos (#12038) 2024-02-22 18:55:22 +00:00
bevy_pbr Update to fixedbitset 0.5 (#12512) 2024-03-17 18:43:05 +00:00
bevy_ptr Add more comprehensive crate level docs for bevy_ptr (#12391) 2024-03-12 14:04:16 +00:00
bevy_reflect Add reflect for type id (#12495) 2024-03-15 17:43:26 +00:00
bevy_reflect_compile_fail_tests bevy_reflect: Recursive registration (#5781) 2024-03-04 19:04:10 +00:00
bevy_render stop retrying removed assets (#12505) 2024-03-16 04:49:16 +00:00
bevy_scene Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_sprite Update to fixedbitset 0.5 (#12512) 2024-03-17 18:43:05 +00:00
bevy_tasks Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_text Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_time Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_transform Use Dir3 in Transform APIs (#12530) 2024-03-17 16:31:34 +00:00
bevy_ui stop retrying removed assets (#12505) 2024-03-16 04:49:16 +00:00
bevy_utils Disentangle bevy_utils/bevy_core's reexported dependencies (#12313) 2024-03-07 02:30:15 +00:00
bevy_window Add "all-features = true" to docs.rs metadata for most crates (#12366) 2024-03-08 20:03:09 +00:00
bevy_winit Make CreateWindowParams type and create_windows system public (#12428) 2024-03-12 14:54:06 +00:00