1 some notes on mesecons and lag
flux edited this page 2023-01-14 04:40:34 +01:00

written in response to some questions from Laylem:

don't worry about causing lag w/ mesecons; currently, mesecons_debug (the mesecons throttling mod) is much too restrictive, i'll eventually get around to reworking the hystereses. counterintutively, one way to improve the performance of your machine is to have mesecons running in many different mapblocks...

i'm aware of the issue w/ luacontrollers occasionally stopping entirely w/out actually going into "overheated" mode. i'm not 100% certain what causes it, but i've seen this happen on servers w/out mesecons_debug, so i don't think that's the reason. it seems to happen more often if they are toggling rappidly (more than 1x a second). i also have diagnosed some luacontroller "freezes" to them being on the edge of a mapblock (press O to see mapblock boundaries).

blinky plants are more reliable, i think, though i don't know if "adjustable" blinky plants are. i don't use them, i try to keep my machines as simple as possible.

do you have a reference of what is causing "usage" in the mesecons_hud? It seems to strongly correlate with node breakers

one thing i've learned recently is that i'm using the wrong lua function to measure time in mesecons_debug (need to us os.clock instead of minetest.get_us_time or os.time). however, you're right, that anything that modifies the map incurs a much larger penalty at the moment than it really should, because most map changes require blocking on a system call at some level, and those are relatively expensive.