<HTML><BODY><div>Thanks for your review. See my answer below.<br><br> <blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Четверг, 2 сентября 2021, 18:48 +03:00 от Igor Munkin <imun@tarantool.org>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16305977010959399781_BODY">Oleg,<br><br>Thanks for the series!<br><br>On 11.08.21, <a href="/compose?To=olegrok@tarantool.org">olegrok@tarantool.org</a> wrote:<br>> From: Oleg Babin <<a href="/compose?To=babinoleg@mail.ru">babinoleg@mail.ru</a>><br>><br>> This patch reworks approach to fiber management in Lua. Before<br>> this patch each action that should return fiber led to new<br>> userdata creation that was quite slow and made GC suffer. This<br>> patch introduces new field in struct fiber to store a reference to<br>> userdata that was created once for a fiber. It allows speedup<br>> operations as fiber.self() and fiber.id().<br>> Simple benchmark shows that access to fiber storage is faster in<br>> two times, fiber.find() - 2-3 times and fiber.new/create functions<br>> don't have any changes.<br>><br>> Initially changes were inspired by #6210 [1] but current patchset<br>> doesn't introduce anything new just improves performance of<br>> existing functions.<br>> Some results are available also in related github PR [2].<br>><br>> [1] <a href="https://github.com/tarantool/tarantool/issues/6210" target="_blank">https://github.com/tarantool/tarantool/issues/6210</a><br>> [2] <a href="https://github.com/tarantool/tarantool/pull/6280" target="_blank">https://github.com/tarantool/tarantool/pull/6280</a><br><br>Does this PR supersedes another one[1] from you? If it does, please<br>close #6215 then.</div></div></div></div></blockquote></div><div> </div><div>Yes, let’s close them. Such approach solves my particular task but there are</div><div>opinions that we shouldn’t add new functions to current fiber API.</div><div> </div><div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div><div class="js-helper js-readmsg-msg"><div><div>><br>> Oleg Babin (4):<br>> fiber: rename ref to fiber_ref<br>> fiber: pass struct fiber into lbox_pushfiber instead of id<br>> fiber: keep reference to userdata if fiber created once<br>> fiber: allocate on_stop triggers using mempool<br>><br>> src/lib/core/fiber.h | 7 ++-<br>> src/lua/fiber.c | 134 ++++++++++++++++++-------------------------<br>> 2 files changed, 62 insertions(+), 79 deletions(-)<br>><br>> --<br>> 2.32.0<br>><br><br>[1]: <a href="https://github.com/tarantool/tarantool/pull/6215" target="_blank">https://github.com/tarantool/tarantool/pull/6215</a><br><br>--<br>Best regards,<br>IM</div></div></div></div></blockquote> <div> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Oleg Babin</div></div></div><div> </div></div></BODY></HTML>