Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove ParallelIterator #2093

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 0 additions & 148 deletions benches/benches/bevy_tasks/iter.rs

This file was deleted.

14 changes: 12 additions & 2 deletions crates/bevy_ecs/src/system/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,14 @@ where
};
}

/// Runs `f` on each query result in parallel using the given task pool.
/// Runs `f` on each query result in parallel using the given task pool. This is
/// the parallel equivalent of [`Self::for_each`]
///
/// Note that the overhead of ParallelIterator is high relative to some
mockersf marked this conversation as resolved.
Show resolved Hide resolved
/// workloads. In particular, if the batch size is too small or task being
/// run in parallel is inexpensive, *a `par_for_each` could take longer
/// than a normal [`Self::for_each`]*. Therefore, you should profile your code before
/// using ParallelIterator.
///
/// This can only be called for read-only queries, see [`Self::par_for_each_mut`] for
/// write-queries.
Expand All @@ -246,7 +253,10 @@ where
};
}

/// Runs `f` on each query result in parallel using the given task pool.
/// Runs `f` on each query result in parallel using the given task pool. This is
/// the parallel equivalent of [`Self::for_each_mut`]
///
/// See [`Self::par_for_each`] for more information on performance.
#[inline]
pub fn par_for_each_mut(
&mut self,
Expand Down
Loading