ID:1192747
 
Keywords: cause, lag, of
Problem description:

Just curious on what the #1 cause of lag is. Some say it's from having too much mobs/objs. Others say its when too much procs/verbs are being called at once. I think it's when you get errors in dreamdaemon. I know all of these cause lag, but can someone rank them from laggiest to least laggiest for future references
It's rather difficult to say what causes the most lag, because anything can cause a variable amount of it. Poor optimization, errant loops, general latency from the server you're using, connection speed of the person playing the game, etc. Any of these things could bring your game to a halt depending on how much memory they're using (or wasting).

First and foremost you should always utilize BYOND's debug profiler to see how much memory your procedures are using, and work from there.
Is 30.002 cpu every 10 mins bad? What should I try limiting it to.

By the way: If a proc is within a proc does the memory increase. My Death proc is called within my Attack proc so whenever I attack the air the cpu is low but when I attack a person it increases with the death proc. Is that inefficient?
In response to Critical172
I usually look at Average Self CPU. If your procs do different things, it might help to split them up to see more specifically what things are causing lag. For example, if you had a death check inside the attack proc, but not as a separate proc, your attack proc could either be somewhat CPU-intensive (for a normal attack) or somewhat more intensive (for some kind of crazy explosion particle effect occurring on death, i.e. something CPU-intensive but doesn't always occur), and you wouldn't be able to tell from the profiler results.
bump to the bump to the bump
It really depends on what actually affects the gameplay experience. This isn't really a hard science as such, I'm afraid. If you have some examples with profiler data, and some screenshot of the profiler window, you mgiht be able to start. Even then though, it's a case of watching the profiler and making a value judgement.