ID:1841982
 
(See the best response by Lummox JR.)
Code:
mob/proc/Super_Saiyan()
if(name=="Goku")
Saiyan = 1
icon = 'Graphics/Characters/GokuX.dmi'
name = "(Super Saiyan) Goku"
Check_Technique()

Problem description:
Not sure why that when changing icon/creating causes cpu? Is this normal? Just wondering.
Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls

/mob/proc/Super_Saiyan 0.070 0.070 0.070 1

Best response
You're changing both icon and name, changing a mob var, and calling another proc. (Why the other proc doesn't show up in the total time, I don't know.)

Changing the icon will create a new appearance, as will changing the name. There is some time factor (although it should not be very high at all) involved in doing so. If the icon hasn't been loaded before, it might also be checked at that time to get its size.

I wouldn't worry about a single proc call's time unless it's super high, though. A single call is subject to a high error margin, compared to multiple calls.
In response to Lummox JR
Lummox JR wrote:
You're changing both icon and name, changing a mob var, and calling another proc. (Why the other proc doesn't show up in the total time, I don't know.)

/mob/proc/Check_Technique 0.000 0.000 0.000 1

Changing the icon will create a new appearance, as will changing the name. There is some time factor (although it should not be very high at all) involved in doing so. If the icon hasn't been loaded before, it might also be checked at that time to get its size.

I wouldn't worry about a single proc call's time unless it's super high, though. A single call is subject to a high error margin, compared to multiple calls.

Ah, I see. Was worried to much about it causing High Spikes.