[Tarantool-patches] [PATCH] lua/utils: improve luaT_newthread performance
Kirill Yukhin
kyukhin at tarantool.org
Wed Jul 29 16:41:25 MSK 2020
Hello,
On 20 июл 14:28, Igor Munkin wrote:
> <luaT_newthread> created a new GCfunc object for the helper invoked in a
> protected <lua_cpcall> frame (i.e. <luaT_newthread_wrapper>) on each
> call. The change introduces a static reference to a GCfunc object for
> <luaT_newthread_wrapper> to be initialized on Tarantool startup to
> reduce Lua GC memory usage.
>
> Furthermore, since <lua_cpcall> yields nothing on guest stack, the newly
> created Lua coroutine need to be pushed back to prevent its sweep. So
> to reduce guest stack manipulations <lua_cpcall> is replaced with
> <lua_pcall> and the resulting Lua thread is obtained via guest stack.
>
> Signed-off-by: Igor Munkin <imun at tarantool.org>
I've checked your patch into 1.10, 2.4, 2.5 and master.
--
Regards, Kirill Yukhin
More information about the Tarantool-patches
mailing list