bevy/crates
Vic 05e61d64f5
implement par_iter_many and par_iter_many_unique (#17815)
# Objective

Continuation of #16547.

We do not yet have parallel versions of `par_iter_many` and
`par_iter_many_unique`. It is currently very painful to try and use
parallel iteration over entity lists. Even if a list is not long, each
operation might still be very expensive, and worth parallelizing.
Plus, it has been requested several times!

## Solution

Once again, we implement what we lack!

These parallel iterators collect their input entity list into a
`Vec`/`UniqueEntityVec`, then chunk that over the available threads,
inspired by the original `par_iter`.

Since no order guarantee is given to the caller, we could sort the input
list according to `EntityLocation`, but that would likely only be worth
it for very large entity lists.

There is some duplication which could likely be improved, but I'd like
to leave that for a follow-up.

## Testing

The doc tests on `for_each_init` of `QueryParManyIter` and
`QueryParManyUniqueIter`.
2025-02-13 19:49:41 +00:00
..
bevy_a11y Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_animation Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_app feat(ecs): configurable error handling for fallible systems (#17753) 2025-02-11 18:36:08 +00:00
bevy_asset Improve clarity of existing bevy_assets documentation (#17830) 2025-02-13 19:49:25 +00:00
bevy_audio Support decibels in bevy_audio::Volume (#17605) 2025-02-10 21:26:43 +00:00
bevy_color Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
bevy_core_pipeline Switch bins from parallel key/value arrays to IndexMaps. (#17819) 2025-02-12 22:39:04 +00:00
bevy_derive Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_dev_tools Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_diagnostic Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_dylib Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_ecs implement par_iter_many and par_iter_many_unique (#17815) 2025-02-13 19:49:41 +00:00
bevy_encase_derive Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
bevy_gilrs Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_gizmos Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
bevy_gltf Add links to the types on the documentation of GltfAssetLabel (#17791) 2025-02-11 01:30:41 +00:00
bevy_image Allowed creating uninitialized images (for use as storage textures) (#17760) 2025-02-10 22:22:07 +00:00
bevy_input Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_input_focus Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_internal Use target_abi = "sim" instead of ios_simulator feature (#17702) 2025-02-11 23:01:26 +00:00
bevy_log Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_macro_utils Fix failing proc macros when depending on bevy through dev and normal dependencies. (#17795) 2025-02-11 18:28:15 +00:00
bevy_math Add ways to configure EasingFunction::Steps via new StepConfig (#17752) 2025-02-11 22:19:01 +00:00
bevy_mesh Upgrade to wgpu v24 (#17542) 2025-02-09 19:40:53 +00:00
bevy_mikktspace Update typos to 1.29.6 (#17850) 2025-02-13 19:44:47 +00:00
bevy_pbr Update typos to 1.29.6 (#17850) 2025-02-13 19:44:47 +00:00
bevy_picking Update typos to 1.29.6 (#17850) 2025-02-13 19:44:47 +00:00
bevy_platform_support Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_ptr Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_reflect Update typos to 1.29.6 (#17850) 2025-02-13 19:44:47 +00:00
bevy_remote Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_render Build batches across phases in parallel. (#17764) 2025-02-13 00:02:20 +00:00
bevy_scene Allow users to register their own disabling components / default query filters (#17768) 2025-02-11 18:25:32 +00:00
bevy_sprite Build batches across phases in parallel. (#17764) 2025-02-13 00:02:20 +00:00
bevy_state Harden proc macro path resolution and add integration tests. (#17330) 2025-02-09 19:45:45 +00:00
bevy_tasks Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_text Allowed creating uninitialized images (for use as storage textures) (#17760) 2025-02-10 22:22:07 +00:00
bevy_time Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_transform Improved Spawn APIs and Bundle Effects (#17521) 2025-02-09 23:32:56 +00:00
bevy_ui Add NodeImageMode to the UI prelude (#17848) 2025-02-13 19:48:45 +00:00
bevy_utils Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_window Cleanup publish process (#17728) 2025-02-09 17:46:19 +00:00
bevy_winit Allowed creating uninitialized images (for use as storage textures) (#17760) 2025-02-10 22:22:07 +00:00