Correct me if I am wrong, but would this function not be faster if that iteration of registered_nodes was output to a smaller array and that the smaller array was used for real-time iteration.
I have't looked at the code in much detail but it seems find_light_update_conductors() is called fairly often in real-time and that any iteration of registered_nodes is best done at register_on_mods_loaded and then the list generated is used in real-time.
Just a small thought that could improve the performance of what is known to be one of the lesser performant mods to run.
https://github.com/minetest-mods/mesecons/blob/master/mesecons/internal.lua#L384
Correct me if I am wrong, but would this function not be faster if that iteration of
registered_nodes
was output to a smaller array and that the smaller array was used for real-time iteration.I have't looked at the code in much detail but it seems
find_light_update_conductors()
is called fairly often in real-time and that any iteration ofregistered_nodes
is best done atregister_on_mods_loaded
and then the list generated is used in real-time.Just a small thought that could improve the performance of what is known to be one of the lesser performant mods to run.