Skip to content
This repository was archived by the owner on Jun 4, 2023. It is now read-only.

Use of try_join_all hurts Tokio performance significantly #6

Open
Darksonn opened this issue Oct 15, 2021 · 2 comments
Open

Use of try_join_all hurts Tokio performance significantly #6

Darksonn opened this issue Oct 15, 2021 · 2 comments

Comments

@Darksonn
Copy link

Due to the coop system, this is very slow on Tokio due to this issue. The issue was fixed for join_all, but not try_join_all.

@jebrosen
Copy link
Owner

Ah yes - thanks for bringing this up! I have been aware of the general issues with *_join_all and coop for a while. However, I have not looked at this particular project in some time - possibly before coop was introduced. Am I right in thinking that spawn should avoid those problems? In fact, spawn would even be closer to the original scenario than try_join_all. I believe I switched to try_join_all to avoid abstracting over (and measuring the overhead of) the different spawn interfaces and implementations.

So I tried updating and fixing this and other issues, but I concluded it would be better to simply update the README and archive the project. I originally wrote this as a reproduction case for a ~40x performance difference that no longer exists, and I haven't maintained it. I sincerely doubt that it produces (or ever produced?) useful or reliable metrics for real applications.

@Darksonn
Copy link
Author

Yeah, spawn should avoid these issues. If you note the issue in the README, that seems fine to me.

It turns out that there aren't many benchmarks comparing Tokio and async-std, so this is one of the benchmarks people use as it's the only they can find.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants