About CPU & Scirpting!
#3

my gamemode uses 6% CPU with 0 players. its 12 timers, 1024 zones, 300 interiors, >7000 streamed objects etc, OnPlayerUpdate() contains 1 line: return 1;.
considering that sscan does have nothing to do with it (how can 3 players use any CPU on executing many commands) - so its some of your routines/algorithms/timers perhaps?
add 20 fcnpcs and have an eye on the CPU, or better let some more players join and tell them to not type any command and stand still. if the CPU usage keeps raising, feel free to start the Performance Profiler plugin.

if you want to speedup your scripts in general, search for the JIT plugin - it precompiles the scritps upon loading and gives them a speed increase between 2x and 10x. i passed the 10x with ease by doing 400000 calculations per 40 ms - its definetly the #1 plugin to use lol

edit: oh, i forgot the sense of your topic while typing ^^
when i load 490 npcs, the CPU usage raises depending on the pathfinding speed, not linear according to the amount of npcs btw, so its easy to let the 1 filterscript eat 80% CPU, remaining 20% for other scripts. i would define 90% as CPU barrier: lag-insurance.
keep scripting, use the JIT, and profile your scripts. stop @ 90%
Reply


Messages In This Thread
About CPU & Scirpting! - by OpticKiller - 18.05.2013, 23:35
Re: About CPU & Scirpting! - by Alternative112 - 18.05.2013, 23:42
Re: About CPU & Scirpting! - by Babul - 19.05.2013, 14:53
Re: About CPU & Scirpting! - by playbox12 - 19.05.2013, 15:47
Re: About CPU & Scirpting! - by OpticKiller - 19.05.2013, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)