You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CPU cost of Creep.getActiveBodyparts should be "low" instead of "insignificant". Here's my reason.
Went for the engine and found that the actual codes of Creep.getActiveBodyparts is down below,
This loop can run up to 50 times in total, which may be a little costy and should not be "insignificant". And also, this result is not cached, which is worth noting in the api.
Spotted this problem after using a lot Creep.getActiveBodyparts and it ended up being the most CPU-costing in screeps-profiler.
I'm not a native English speaker, please excuse my grammar mistakes.
The text was updated successfully, but these errors were encountered:
The CPU cost of Creep.getActiveBodyparts should be "low" instead of "insignificant". Here's my reason.
Went for the engine and found that the actual codes of
Creep.getActiveBodyparts
is down below,This loop can run up to 50 times in total, which may be a little costy and should not be "insignificant". And also, this result is not cached, which is worth noting in the api.
Spotted this problem after using a lot Creep.getActiveBodyparts and it ended up being the most CPU-costing in screeps-profiler.
I'm not a native English speaker, please excuse my grammar mistakes.
The text was updated successfully, but these errors were encountered: