I am making a terrain generation system that iterates through a 3 dimensional array and a few others. I am using Heartbeat:Wait() to achieve fast iteration times and script activity is through the roof at about 85% and rate is also about 130/s, and this script runs twenty times (it is cloned 20 times), taking about 48 seconds to run all twenty, and it only happens once at server start.
Apparently, a very high script activity is really bad, as in, anything above 3-5%, but my inkling is that this falls outside of that general rule because the game is loading and there should not be anything else running at that time. Am I correct in this?
I have optimized my code with a bunch of local function assignments and used other code optimization techniques to minimize the impact, but it’s still that high.