Open Rastikko opened 8 years ago
I've tried to understand why and looks like is happening in the requires at the begging:
console.log('before: ', Game.cpu.getUsed()) require('_room'); require('_spawn'); require('_creep'); require('_source'); require('_tower'); var commander = require('commander'); var metaAlpha = require('meta-alpha'); console.log('after: ', Game.cpu.getUsed())
Perhaps the require is that expensive? Maybe we should concatenate files with grunt concat.
Mhh could be that the I/O Op is included inside the CPU.
Actually, this might be a server side issue: http://support.screeps.com/hc/en-us/community/posts/206915829-Extreme-increase-in-CPU-usage-with-the-same-script
I've tried to understand why and looks like is happening in the requires at the begging:
Perhaps the require is that expensive? Maybe we should concatenate files with grunt concat.