Hi there
I've read all the posts I could find about the CPU cost of requires at the beginning of the script. I'm still not sure, though, whether this is what I am experiencing:
console.log(Game.cpu.getUsed()) at the beginning of the loop mostly indicates something between 0.1 and somewhere in the 30s, which is fine. In irregular intervals, however, the reported CPU usage at the beginning of the loop is between 300 and 400, sometimes over 400. If that happens, it can happen again the very next tick, or wait for 3 or 4 ticks before striking again, or it can disappear for minutes. Is that a normal pattern for require handling?
I am executing 28 requires, importing approx. 249kb of source code. I read somewhere that having all this code in one file would not change much, so could anyone give me an idea, what to try? With a CPU limit of 110 and such CPU spikes, repeated script stops currently damper the fun.
Thanks!