Skip to content

switch from async to rayon [v3] #2173

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

Open
wants to merge 1 commit into
base: release/v3
Choose a base branch
from
Open

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Apr 22, 2025

This switches from async rust to using rayon for conformance test parallelism. I'm making this PR against FVM v3 because we currently have conformance tests there.

Motivation:

  • Primary: Remove the need for maintainers to understand/work with complex async code.
  • Secondary: Remove async-std (deprecated).

Performance:

  • Startup performance for the conformance tests is significantly slower (something to do with locking when we compile the built-in actors from multiple threads?).
  • Runtime performance appears to be the same.

Overall, the conformance tests go from 6 to 12 seconds which isn't great (2x) but that extra time appears to be entirely "startup" cost and shouldn't scale with the number of tests.

fixes #2144

@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz Apr 22, 2025
@Stebalien Stebalien requested a review from rvagg April 22, 2025 14:51
@Stebalien Stebalien force-pushed the steb/remove-async-v3 branch from 5396eee to 7b718b8 Compare April 22, 2025 14:53
@Stebalien
Copy link
Member Author

@rvagg if this isn't easier to understand, it's not worth it. I thought it was going to be simpler, but error handling with rayon was surprisingly difficult. It might be better to re-try this with channels and a thread-pool, although error handling will still be tricky.

My issue with async-await is that it comes with a bunch of sharp edges around moving things and the error messages can be cryptic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📌 Triage
Development

Successfully merging this pull request may close these issues.

1 participant