You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 17, 2018. It is now read-only.
I'm experimenting with using lua.vm.js to run scripts multiple times per second (game application). The scripts execute functions stored on javascript objects, but this seems to cause LuaVM.Lua.refs to grow larger after each script iteration, which affects performance.
Although the number of non-null elements in LuaVM.Lua.refs remains constant, since the array grows larger and larger, the time taken to execute indexOfhere becomes increasingly long.
I've prepared a reproduction below, demonstrating how the length of LuaVM.Lua.refs increases proportionally to the number of script iterations, and that this increases the time required to execute subsequent scripts. If my approach to calling functions outside of the vm could be improved, I'd appreciate any advice.