Jericho1060 / du-storage-monitoring

a simple storage monitoring for Dual Universe
GNU General Public License v3.0
26 stars 15 forks source link

CPU Overload on factories large numbers of containers. #2

Closed TheGeek007 closed 2 years ago

TheGeek007 commented 3 years ago

I have a large factory with 100+ containers and hubs. I kept getting CPU overloads on the init tick before it could build the table of containers.

I did some testing with coroutines, but nothing worked. I got some help from the people in the DU Discord's #lua channel, but nothing they suggested helped.

My hypothesis is that table.insert() is causing the CPU overload when the table has gotten too big somehow. Without knowing how this function works, I can't figure out what the cause is.

I could not find any workarounds that solved the problem.

Jericho1060 commented 3 years ago

Hey Thank you for the report Yes i know that problem, i wasn't thinking someone will use that program with so many containers. Someone else also reported it to me

i will fix it soon, i know the way to do it, i just need to find the time to do it :D