Преглед на файлове

Reduce overhead by directly managing reply handlers for multibulk replies.

Daniele Alessandri преди 14 години
родител
ревизия
db92c7a9b8
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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));
             }
         }