Sfoglia il codice sorgente

Reduce overhead by directly managing reply handlers for multibulk replies.

Daniele Alessandri 14 anni fa
parent
commit
db92c7a9b8
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      lib/Predis.php

+ 3 - 1
lib/Predis.php

@@ -611,7 +611,9 @@ class ResponseMultiBulkHandler implements IResponseHandler {
         if ($listLength > 0) {
             $reader = $connection->getResponseReader();
             for ($i = 0; $i < $listLength; $i++) {
-                $list[$i] = $reader->read($connection);
+                $header = $connection->readLine();
+                $handler = $reader->getHandler($header[0]);
+                $list[$i] = $handler->handle($connection, substr($header, 1));
             }
         }