[Slim-Checkins] r10456 - /trunk/server/Slim/Networking/Select.pm
adrian at svn.slimdevices.com
adrian at svn.slimdevices.com
Mon Oct 23 12:28:20 PDT 2006
Author: adrian
Date: Mon Oct 23 12:28:18 2006
New Revision: 10456
URL: http://svn.slimdevices.com?rev=10456&view=rev
Log:
Bug: N/A
Description: Optimise select common case - return as fast as possible
if nothing to do. Allows select/timer loop to spin 10% faster.
Modified:
trunk/server/Slim/Networking/Select.pm
Modified: trunk/server/Slim/Networking/Select.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Networking/Select.pm?rev=10456&r1=10455&r2=10456&view=diff
==============================================================================
--- trunk/server/Slim/Networking/Select.pm (original)
+++ trunk/server/Slim/Networking/Select.pm Mon Oct 23 12:28:18 2006
@@ -197,6 +197,9 @@
: IO::Select->select($selects->{'read'}, $selects->{'write'}, $selects->{'error'}, $select_time);
$::perfmon && ($endSelectTime = Time::HiRes::time());
+
+ # return now if nothing to service - optimisation for most common case
+ return unless ( $r || $w || $e );
$selectInstance = ($selectInstance + 1) % 1000;
More information about the checkins
mailing list