[Tarantool-patches] [PATCH] lua: lua_field_inspect_table without pushcfunction

Kirill Yukhin kyukhin at tarantool.org
Wed Jun 10 16:39:11 MSK 2020


Hello,

On 10 июн 16:01, Igor Munkin wrote:
> 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.

Thanks! ChangeLog entry is correct.

--
Regards, Kirill Yukhin


More information about the Tarantool-patches mailing list