-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Swap std::sync::mpsc channel with crossbeam_channel #7844
Conversation
Switching this hoping it closes rust-lang#7840
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @ehuss |
I don't think we can make this change. When combined with #7838, it causes a very dramatic performance hit. Fresh builds can be many times slower (9 times slower with 500 units). |
That's quite unexpected from my perspective at least -- have we done any profiling to suggest why that would be the case? Generally crossbeam-channel suggests in docs and such that it's faster/better all around than std's impl, but I guess that's not the case? |
I might try digging into it more later. It looks like it is having a strange interaction with the jobserver helper thread. I can measure dropping the helper thread takes over 1s (but not always). |
I don't believe we can switch to crossbeam's channels since they do not have a blocking send function which #7838 will require, so this'll likely just require more churn otherwise. I was working on #7845 yesterday but didn't get a chance to polish it until this morning, but that's the route I think we should take (just write our own simple queue). I'll comment over there about the performance though |
The issue I was seeing is dropping the job server can take up to 1 second, see rust-lang/jobserver-rs#23. I'm guessing that the change to crossbeam is just altering the behavior slightly enough for it to trigger that.
I'm not sure what you mean by this. Crossbeam has a |
Ok the jobserver issue should be fixed now, sorry about that and thanks for helping to diagnose it @ehuss! Also apologies, I was looking at the documentation for Here's my proposed plan of action (which I'll go ahead and enact at the bottom)
@bors: r+ |
📌 Commit 20ddff8 has been approved by |
⌛ Testing commit 20ddff8 with merge cc42c0b31c4478b6de64c52f588dc518e80990c2... |
💡 This pull request was already approved, no need to approve it again.
|
📌 Commit 20ddff8 has been approved by |
Swap std::sync::mpsc channel with crossbeam_channel Hoping it closes #7840 r? @Mark-Simulacrum
☀️ Test successful - checks-azure |
Hoping it closes #7840
r? @Mark-Simulacrum