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

Several BlockingCollection.TryTake inefficiencies #28426

Open
2 tasks
stephentoub opened this issue Jan 15, 2019 · 0 comments
Open
2 tasks

Several BlockingCollection.TryTake inefficiencies #28426

stephentoub opened this issue Jan 15, 2019 · 0 comments

Comments

@stephentoub
Copy link
Member

  • It's allocating a new CancellationTokenSource for every call.
  • It's using an OperationCanceledException for control flow in case of CompleteAdding.

I noticed the second issue here as it was causing a measurable perf degradation in a particular scenario with the debugger attached (which makes exceptions even more expensive), and the former is related.

@msftgits msftgits transferred this issue from dotnet/corefx Feb 1, 2020
@msftgits msftgits added this to the 5.0 milestone Feb 1, 2020
@maryamariyan maryamariyan added the untriaged New issue has not been triaged by the area owner label Feb 23, 2020
@stephentoub stephentoub removed the untriaged New issue has not been triaged by the area owner label Feb 25, 2020
@stephentoub stephentoub modified the milestones: 5.0, Future Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants