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

Change to avoid Stopwatch allocation if timeout for PollNonBlocking is 0 #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

psfblair
Copy link

We recently noticed issues with memory usage and increased GC pressure with high traffic under clrzmq. We traced the issue to the fact that the Poller's PollNonBlocking(timeout) method allocates a new Stopwatch with every iteration of the loop. With the timeout set to 0 this allocation is unnecessary. The attached change doesn't initialize a Stopwatch if the timeout for PollNonBlocking is set to 0.

…the polling loop if the timeout for PollNonBlocking is set to 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant