From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6D9F040F3AE for ; Wed, 10 Jun 2020 16:11:05 +0300 (MSK) Date: Wed, 10 Jun 2020 16:01:55 +0300 From: Igor Munkin Message-ID: <20200610130155.GO5745@tarantool.org> References: <20200518093748.16825-1-skaplun@tarantool.org> <20200610121506.74766b5p7mbupum2@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200610121506.74766b5p7mbupum2@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] lua: lua_field_inspect_table without pushcfunction List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy Kirill, On 10.06.20, Kirill Yukhin wrote: > Hello, > > On 18 май 12:37, Sergey Kaplun wrote: > > Currently on encoding table we push cfunction (lua_field_try_serialize) > > to lua stack with additional lightuserdata and table value and after > > pcall that function to avoid a raise of error. > > > > In this case LuaJIT creates new object which will not live long time, > > so it increase amount of dead object and also increase time and > > frequency of garbage collection inside LuaJIT. > > Also this pcall is necessary only in case when metafield __serialize > > of serilizable object has LUA_TFUNCTION type. > > > > So instead pushcfunction with pcall we can directly call the function > > trying to serialize an object. > > --- > > > > branch: https://github.com/tarantool/tarantool/tree/skaplun/no-ticket-lua-inspect-table-refactoring > > I've checked your patch into master. Just in case: you replied to v1 thread but the applied patch relates to v2. I would like to mention that ChangeLog entry changes between versions. > > -- > Regards, Kirill Yukhin -- Best regards, IM