What is lua garbage incremental?
What is lua garbage incremental?
What is lua garbage incremental, why can it be high (1-2 or more) and what do I do to make it lower? I couldn't find any descriptions of it's practical meaning for Factorio, and general Lua GC explanations are too heavy. Does this show overall mod script execution overhead and I should deactivate some mods (AAI in the first place)?
Re: What is lua garbage incremental?
It's the amount of time spent running Lua garbage collection. Higher times mean mods are making more garbage (being wasteful in what they do).
If you want to get ahold of me I'm almost always on Discord.
Re: What is lua garbage incremental?
Is there any way to get a breakdown of which mods are causing high Lua garbage collection times?
Re: What is lua garbage incremental?
I tried the reduce-mods-by-half method to see if any particular mods would be significant consumers of this, but found that while there are some variations indeed, there is no mod that "consumes GC noticeably enough to be worth disabling". Did this a couple of months ago, most difference from 1 mod was 100ms or lower (Factorissimo? AAI? not sure), I think. The overall quantity of mods does influence this a lot though, I have a lot of mods.
Last edited by YunoAloe on Tue Oct 15, 2019 9:16 pm, edited 1 time in total.
Re: What is lua garbage incremental?
Garbage in mods is caused by one or more of the following:
* Subscribing to events they don't actually need to subscribe to
* Creating tables and then throwing them away/overwriting them
* Creating strings/re-creating strings/concatinating strings/overwriting strings (basically doing anything with strings)
* Inserting/removing from tables
* Not caching the result of Lua API calls (game.player.position.x, game.player.position.y) that reads player twice and position twice and throws both away. It should read player once and position once then store the position in a local and read x/y off that.
* Subscribing to events they don't actually need to subscribe to
* Creating tables and then throwing them away/overwriting them
* Creating strings/re-creating strings/concatinating strings/overwriting strings (basically doing anything with strings)
* Inserting/removing from tables
* Not caching the result of Lua API calls (game.player.position.x, game.player.position.y) that reads player twice and position twice and throws both away. It should read player once and position once then store the position in a local and read x/y off that.
If you want to get ahold of me I'm almost always on Discord.