[Tarantool-patches] [PATCH 2/2] box: reduce box_process_lua Lua GC memory usage

Igor Munkin imun at tarantool.org
Sun Jun 21 22:09:24 MSK 2020


Vlad,

On 21.06.20, Vladislav Shpilevoy wrote:
> > diff --git a/src/box/lua/call.c b/src/box/lua/call.c
> > index e1b1a5e81..e52f16ca4 100644
> > --- a/src/box/lua/call.c
> > +++ b/src/box/lua/call.c
> > @@ -48,6 +48,15 @@
> >  #include "mpstream/mpstream.h"
> >  #include "box/session.h"
> >  
> > +/*
> 
> Please, change to /**. In out of function comments we use /**
> as a comment start.

Yes, it's mentioned in commenting example[1] but I see license comment
doesn't conform these guidelines. Nevertheless, I fixed, squashed,
force-pushed to the branch. Diff is below:

================================================================================

diff --git a/src/box/lua/call.c b/src/box/lua/call.c
index e52f16ca4..c3c60a4aa 100644
--- a/src/box/lua/call.c
+++ b/src/box/lua/call.c
@@ -48,7 +48,7 @@
 #include "mpstream/mpstream.h"
 #include "box/session.h"
 
-/*
+/**
  * Handlers identifiers to obtain lua_Cfunction reference from
  * Lua registry table. These handlers are initialized on Tarantool
  * startup and are used until the Lua universe is destroyed.

================================================================================

> 
> > + * Handlers identifiers to obtain lua_Cfunction reference from
> > + * Lua registry table. These handlers are initialized on Tarantool
> > + * startup and are used until the Lua universe is destroyed.
> > + * Such approach reduces Lua GC usage since there is no need to
> > + * create short-lived GCfunc objects for the corresponding C
> > + * function on each iproto CALL/EVAL request or stored Lua
> > + * procedure call.
> > + */

[1]: https://www.tarantool.io/en/doc/2.3/dev_guide/c_style_guide/#commenting-style

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list