Eliminate some obviously useless threading #4219
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
pub fn ed25519_verify_disabled(batches: &mut [PacketBatch]) in perf/src/sigverify.rs
does pretty much no work (sets a boolean flag for each Packet in PacketBatch) and yet it creates doubly nested parallel iterators to achieve this results. It further does this on rayon's global thread pool so it is impossible to do accounting on this activity.
Summary of Changes
Changed the function to set the flags in single thread. Unless there are several thousands of packets in those batches, this will be faster.