zeromq/clrzmq — pull request #134 by psfblair (2013-05-13 20:20:34+00:00)
Title: Change to avoid Stopwatch allocation if timeout for PollNonBlocking is 0

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.