Hi, Sergey!
Sure, consider this script:
| jit.off()
| misc.sysprof.start{mode = 'C', interval=10}
| for i = 1, 1e7 do tostring(i) end
| misc.sysprof.stop()
 
After running it with luajit you can parse the output
like this:
| $ time -v luajit-parse-sysprof sysprof.bin
 
So, before the patch:
| Maximum resident set size (kbytes): 224928
 
And after the patch:
| Maximum resident set size (kbytes): 32780
 
Which is 85% reduction in memory consumption.
--
Best regards,
Maxim Kokryashkin
 
 
Вторник, 5 сентября 2023, 14:53 +03:00 от Sergey Bronnikov <sergeyb@tarantool.org>:
 
Hi, Max

thanks for the patch. See my comment below.


On 8/28/23 18:23, Maxim Kokryashkin wrote:
> Since both of the profiler parsers are now processing
> the events in a stream-like fashion, the generation
> mechanism is excessive and can be purged. This results
> in a significant memory consumption drop, especially
> for the AVL-tree part.

Would be interesting to see a numbers with memory consumption

before and after the patch.