Re: Spreading a table out over several ticks
Posted: Thu May 05, 2022 6:14 pm
Ok, so I've noticed that using the deepcopy hurts the ups greatly over ~4k planters (at ~8k, ups was ~30), so I've changed it to simply local planters = global.planters (and local saplings = global.saplings, respectively) and that fixed it. However, if someone could clarify something for me... I may be getting this confused with another language or even a different data type, but with tables, if I simply do a table2 = table1, am I actually making a copy of that table, or merely creating a reference to it? I'm worried that it's a reference and so if anything happens to trigger the add while it's looping, it'll still error.
------------------------------------------
------------------------------------------
That was 3 hours later. If it'd only been a few minutes, I would've.Qon wrote: ↑Thu May 05, 2022 5:07 pmUse the edit button.FuryoftheStars wrote: ↑Thu May 05, 2022 3:04 pmWhoops. Meant ~4k planters and ~3k-3.5k saplings.FuryoftheStars wrote: ↑Thu May 05, 2022 12:25 pmI noticed that at ~2k planters with ~1.5k saplings growing I was taking a 5-10 ups hit.