Module: nagvis
Branch: master
Commit: d54e44cf44c848480dcb8e65c7585de7f4a62c81
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=d54e44cf44c848480dcb8e65c7585de7f4a62c81

Author: LaMi <[email protected]>
Date:   Thu Apr  1 17:36:01 2010 +0200

Small performance improvement

---

 .../core/classes/GlobalBackendmklivestatus.php     |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/share/server/core/classes/GlobalBackendmklivestatus.php 
b/share/server/core/classes/GlobalBackendmklivestatus.php
index c82cf21..e49c862 100644
--- a/share/server/core/classes/GlobalBackendmklivestatus.php
+++ b/share/server/core/classes/GlobalBackendmklivestatus.php
@@ -263,17 +263,16 @@ class GlobalBackendmklivestatus implements 
GlobalBackendInterface {
                $socketData = '';
                
                while($offset < $len) {
-                       if(($data = @socket_read($this->SOCKET, $len-$offset)) 
=== false) {
+                       if(($data = @socket_read($this->SOCKET, $len - 
$offset)) === false) {
                                return false;
                        }
                
-                       $dataLen = strlen ($data);
-                       $offset += $dataLen;
-                       $socketData .= $data;
-                       
-                       if($dataLen == 0) {
+                       if(($dataLen = strlen($data)) === 0) {
                                break;
                        }
+                       
+                       $offset += $dataLen;
+                       $socketData .= $data;
                }
                
                return $socketData;


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to