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

Eliminate some obviously useless threading #4219

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexpyattaev
Copy link

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.

Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @alexpyattaev - The PR description and code changes don't match; the problem description refers to sigverify but the actual diff is touching rocksdb.

Ignoring that and responding to the rocksdb changes, I still think wiring things up to be configurable (on the CLI for now since that is where everything else is) is the right move for now to allow some customization & leave an escape hatch for later.

I have #4214 which does that; I opened this a couple days ago but didn't add reviewers and/or draw attention to it in light of the holidays. I think our efforts were mostly tangential here, but we can make sure to coordinate better in Slack to avoid any duplicated efforts moving forwards

@alexpyattaev
Copy link
Author

Sorry I have pushed the wrong diff. Should not make PRs late at night. Especially the "small and trivial" ones.

@alexpyattaev alexpyattaev requested a review from steviez January 1, 2025 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants