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

Use rayon for broadcast_commit_event #779

Merged
merged 2 commits into from
Jan 31, 2024
Merged

Conversation

coolreader18
Copy link
Collaborator

@coolreader18 coolreader18 commented Jan 29, 2024

Description of Changes

Switch to rayon for broadcast_commit_event - this makes the concurrency more straightforward to follow, and I think would make it easier to update in the future.

Expected complexity level and risk

1

@coolreader18 coolreader18 force-pushed the noa/rayon_broadcast_commit branch from 6892ed0 to f851050 Compare January 29, 2024 21:24
Copy link
Collaborator

@joshua-spacetime joshua-spacetime left a comment

Choose a reason for hiding this comment

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

I like this change. My only question concerns performance - how much overhead does rayon add?

crates/core/src/host/mod.rs Show resolved Hide resolved
crates/core/src/subscription/module_subscription_actor.rs Outdated Show resolved Hide resolved
@coolreader18
Copy link
Collaborator Author

@joshua-spacetime No overhead, actually! It should make things more efficient, since instead of spawning N threads for however many subscribers there are, it puts it on a threadpool, so it's still parallelized but there's less contention. (John and I just figured out that that attribute fixes the deadlock we've been having)

Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

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

Tested using the bots (128CCU) and this appears to fix the deadlock issue, thank you Noa! 🎉

@coolreader18 coolreader18 force-pushed the noa/rayon_broadcast_commit branch from b0af292 to 3606f2b Compare January 30, 2024 23:23
@coolreader18 coolreader18 added this pull request to the merge queue Jan 31, 2024
Merged via the queue into master with commit a58bfd4 Jan 31, 2024
5 checks passed
@coolreader18 coolreader18 deleted the noa/rayon_broadcast_commit branch February 1, 2024 00:31
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.

4 participants