From 4f7c8f97c32f49cd3dd43753c03bb7d6001a88f3 Mon Sep 17 00:00:00 2001
From: Roman Tsisyk <roman@tsisyk.com>
Date: Fri, 11 Sep 2015 16:09:28 +0300
Subject: [PATCH] Fix perfomance regression in box.space.name:select()

This regression introducing during replacing port_ffi with port_buf
by 2fcce449dc46f7f00e515d585a0a885f9f2b4610
---
 src/box/lua/schema.lua | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua
index 308d1842d4..0c108a74a1 100644
--- a/src/box/lua/schema.lua
+++ b/src/box/lua/schema.lua
@@ -807,11 +807,9 @@ function box.schema.space.bless(space)
 
         local ret = {}
         local entry = port_buf.first
-        local i = 1
-        while entry ~= nil do
+        for i=1,tonumber(port_buf.size),1 do
             ret[i] = box.tuple.bless(entry.tuple)
             entry = entry.next
-            i = i + 1
         end
         builtin.port_buf_destroy(port_buf);
         return ret
-- 
GitLab