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

near-vm: Make rayon unconditional and remove into_par_iter_if_rayon #8948

Open
nagisa opened this issue Jun 28, 2022 · 4 comments
Open

near-vm: Make rayon unconditional and remove into_par_iter_if_rayon #8948

nagisa opened this issue Jun 28, 2022 · 4 comments
Labels
A-contract-runtime Area: contract compilation and execution, virtual machines, etc C-housekeeping Category: Refactoring, cleanups, code quality T-contract-runtime Team: issues relevant to the contract runtime team

Comments

@nagisa
Copy link
Collaborator

nagisa commented Jun 28, 2022

Describe the bug

Making use of rayon optional is causing us to take suboptimal implementation decisions that hurt both rayon and non-rayon use-cases (such as collecting twice, first into a vector, then into PrimaryMap.)

If making use of rayon unconditional (if you need to limit worker threads, setup the thread pool accordingly) makes way for simplifying those areas of code, we should just go ahead with it.

@matklad
Copy link
Contributor

matklad commented Jun 28, 2022

My gut feeling is that we should unconditionally not use rayon perhaps? It won't help with worst-case, and, architecture-wise, it is perhaps more prudent to add || on a higher level:

  • when compiling a bunch of contracts, compile them in parallel (catchup mode) (already doing this)
  • when compiling a single contract during deploy, compile it off the main thread. (not doing this yet, but could do)

@nagisa
Copy link
Collaborator Author

nagisa commented Jun 28, 2022

That would work too, sure.

@matklad
Copy link
Contributor

matklad commented Jun 28, 2022

Ok, let's just remove rayon then!

@Ekleog-NEAR
Copy link
Collaborator

@nagisa nagisa transferred this issue from near/wasmer Apr 24, 2023
@nagisa nagisa changed the title Make rayon unconditional and remove into_par_iter_if_rayon near-vm: Make rayon unconditional and remove into_par_iter_if_rayon Apr 24, 2023
@nagisa nagisa added C-housekeeping Category: Refactoring, cleanups, code quality A-contract-runtime Area: contract compilation and execution, virtual machines, etc T-contract-runtime Team: issues relevant to the contract runtime team labels Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contract-runtime Area: contract compilation and execution, virtual machines, etc C-housekeeping Category: Refactoring, cleanups, code quality T-contract-runtime Team: issues relevant to the contract runtime team
Projects
None yet
Development

No branches or pull requests

3 participants