mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 20:11:42 +00:00
incremental garbage collection to combat lag
This commit is contained in:
parent
14cc1c74da
commit
d121050be9
1 changed files with 4 additions and 2 deletions
|
|
@ -350,10 +350,12 @@ void smlua_update(void) {
|
|||
// incremental collection fails to keep up after some time.
|
||||
// So, for now, stop the GC from running during the hooks
|
||||
// and perform a full GC at the end of the frame.
|
||||
// EDIT: That builds up lag over time, so we need to keep
|
||||
// doing incremental garbage collection.
|
||||
// The real fix would be to make smlua produce less
|
||||
// garbage.
|
||||
lua_gc(L, LUA_GCSTOP, 0);
|
||||
lua_gc(L, LUA_GCCOLLECT, 0);
|
||||
// lua_gc(L, LUA_GCSTOP, 0);
|
||||
// lua_gc(L, LUA_GCCOLLECT, 0);
|
||||
}
|
||||
|
||||
void smlua_shutdown(void) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue