Reduce allocations per LuaClosure call #76

Closed
LobbyDivinus wants to merge 3 commits from TheoTown-Team/master into master

3 Commits

Author SHA1 Message Date
Lobby
12a449abec Reduce allocations per LuaClosure call
Every call of a LuaClosure issues creation of a new stack frame for the function execution. Since this stack is usually thrown away after execution pooling them can help to reduce garbage collection overhead (there's one exception to this: the stack can be used as part of the returned varargs object, in that case it cannot be reused since that could cause conflicts). In my use case this change was a useful for calling a lot of Lua functions on a mobile device.
2020-09-01 10:38:36 +02:00
Lobby
1084047e47 Revert "Update LuaClosure.java"
This reverts commit 7ed120b704.
2020-09-01 10:29:49 +02:00
Lobby
7ed120b704 Update LuaClosure.java
Re-use stack frames in LuaClosure if possible to reduce number of allocations per function call
2020-09-01 10:27:13 +02:00