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 Aug 20, 2020. It is now read-only.
Some mods implement their tick logic using globalstep callbacks and a timer variable. This is heavy because the Lua VM must execute every callback for each server step, however if there is a timer (generally 1s) most of the time no actual code gets executed, just the timer variable {in,de}cremented.
Replacing this technique by minetest.after would reduce code duplication as well as increase performance since all the timers this function creates are handled by the same loop (in builtin/game/misc.lua#9), reducing the need to do context switches (locals) and allowing LuaJIT to streamline timer ticking to the maximum possible extent, thus increasing performance.