StructureSpawn.createCreep creates high cpu-load



  • I currently have ~180 creeps, and every successful call to StructureSpawn.createCreep() takes about 12 cpu to execute.

    I pass a name when calling it and the canCreateCreep() call within createCreep() takes about 0.1 cpu.to execute

     

     

     



  • I'm just guessing here, but do you manually name your creeps or use the "Random" names that get automatically generated? In the latter case, maybe you're getting close to the number of available random names so a lot of time is wasted trying to find a name that isn't taken yet.



  • I was passing custom names to make sure, that the name generation is not responsible for the long execution time.