Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Slow performance of non-blocking select?

by PMCarl (Initiate)
on Nov 05, 2012 at 22:09 UTC ( #1002393=note: print w/ replies, xml ) Need Help??


in reply to Re: Slow performance of non-blocking select?
in thread Slow performance of non-blocking select?

Thanks flexvault!

My first thought was: "I'm using non-blocking IO::Select objects, so the time-out shouldn't matter"

...but that seems to have been the problem. 'can_read' and IO::Select::select both seem to be blocking even though I'm calling $obj->blocking(0);

By using a very small time-out, I'm able to get very close to the performance of the original version of that package. Some runs actually show the new version out-performing the old one.

The way the code is structured, it misses time that it could be doing other things while it is being blocked on can_read, so I don't get the advantage that you may be getting.

Cheers!


Comment on Re^2: Slow performance of non-blocking select?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002393]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2015-07-02 05:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (29 votes), past polls