Re: [zeromq-dev] pyzmq poller performance

2013-07-24 Thread Brian Knox
Min - just a quick follow up on this. I had a little spare time today (don't tell anyone) so I put together a single socket to single socket poller / no poller test in C with libzmq. The ratio was almost the same as pyzmq - I had ~ 1.37 million messages a second with the poller, and ~ 4.7 million

Re: [zeromq-dev] pyzmq poller performance

2013-06-26 Thread Brian Knox
Min - I merged the poll request on my little laptop and gave it a spin. Before your pull request: mps: 28066 mps: 28116 mps: 29745 mps: 28912 mps: 28679 after your pull request: mps: 78138 mps: 78364 mps: 78411 mps: 78065 mps: 78175 Excellent. By the way, just for fun I imported zmq.green inst

Re: [zeromq-dev] pyzmq poller performance

2013-06-25 Thread Brian Knox
Thanks! The 4x degradation is within an acceptable range for what we're doing and will allow me to keep some things in python for awhile longer. I'll patch locally and take it for a test drive today. Brian On Mon, Jun 24, 2013 at 11:09 PM, MinRK wrote: > From my tests this evening, it looks l

Re: [zeromq-dev] pyzmq poller performance

2013-06-24 Thread MinRK
>From my tests this evening, it looks like zmq_poll does have an appreciable cost (plus the overhead of being wrapped in Python), and will be notably slower than a simple `while True: s.recv()`. But I did find some inefficiencies in the Poller implementation, which should be addressed by PR #381 <

Re: [zeromq-dev] pyzmq poller performance

2013-06-24 Thread Brian Knox
Thanks Min - additionally if I'm incorrect in my assumption that the poll look in my example code should perform better, or if there's a better way to do what I'm doing just let me know. The example code polls only one socket (which isn't that useful, hah) but I wanted to keep the test case dirt s

Re: [zeromq-dev] pyzmq poller performance

2013-06-24 Thread Min RK
Thanks for the report, I will look into whether I have introduced a performance degradation in the last few iterations. -MinRK On Jun 24, 2013, at 11:27, Brian Knox wrote: > It's been awhile since I've used pyzmq, and I'm running into a performance > issue using Poller.poll(). > > With a si

[zeromq-dev] pyzmq poller performance

2013-06-24 Thread Brian Knox
It's been awhile since I've used pyzmq, and I'm running into a performance issue using Poller.poll(). With a simple blocking recv() in a while True loop, I get ~ 300k messages a second. With the simplest case of the same code using a poll on the socket, I get ~ 30k messages a second. (pyzeromq)t