HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Performance test

03-23-2008, 03:16 PM#1
grupoapunte
Hey, i been trying to do some performance tests to my map and i had the idea to evaluate the number of triggers that are evaluated or executed when a unit dies (i have a few triggers with this event), at first i simply made a global counter which was modified every time a trigger condition function was executed, when i tested it i got realy scared! only after 2 minutes of gameplay those triggers were executed 2600 times (yeah 2600, my map is an aos with a max unit limit of 100 at the same time). So now i want to see if i can reduce that number by reducing the number of false conditions when triggers execute (a more acurate event <-> unit attachment). So the question is does GetTriggerEvalCount gives the number of times that the trigger was executed during all gameplay?

Also anyone knows a list of most common net trafic functions? does triggers execute at host only? im just trying to learn more about game mechanics

Thanks!
03-23-2008, 03:22 PM#2
darkwulfv
2600 times isn't a lot, so long as you don't have leaks or anything. If those triggers haven't caused any lag, they don't leak, and it's normal for them to be firing that often (units dying), then I wouldn't worry too much.
03-24-2008, 07:25 PM#3
grupoapunte
Yeah i know its not much but by just making 2 simple fuctions i reduced the number to the half. I have another question, one of the triggers that i use simply removes the units that die after 3 seconds, is this realy useful? i made it long ago and now that i see it im wondering if i could simply change the game constants "Decay Time (sec) - XXX" and put them in 3 seconds and remove the trigger, does the map removes the units or it would be considered as leaks? also my map has a lot of effects (a lot of units shoting at the same time) if i also reduce the effect decay time to lets say 1 second can i get any improvements from that? My goal is to make the map playable in a pentium 3 800mhz with a geforce 2, which is a bit laggy right now, LOL

Thanks

By the way, this are the functions, one for computer players and the other for human players.
Collapse JASS:
function MyTriggerRegisterPlayerAnyUnitEvent takes trigger trig, playerunitevent whichEvent returns nothing
    call TriggerRegisterPlayerUnitEvent(trig, Player(0), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(1), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(2), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(3), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(4), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(6), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(7), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(8), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(9), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(10), whichEvent, null)
endfunction

function MyTriggerRegisterComputerAnyUnitEvent takes trigger trig, playerunitevent whichEvent returns nothing
    call TriggerRegisterPlayerUnitEvent(trig, Player(5), whichEvent, null)
    call TriggerRegisterPlayerUnitEvent(trig, Player(11), whichEvent, null)
endfunction
03-27-2008, 01:20 AM#4
TheSecretArts
Quote:
Originally Posted by grupoapunte
My goal is to make the map playable in a pentium 3 800mhz with a geforce 2

uhh... fail! My 5-yr old laptop I got for free because it was junk is twice as fast.

But seriously, less than 1 ghtz is bad, saying my piece of crap 'low-profile' computer has 1.6 ghtz.
03-27-2008, 01:41 AM#5
Taur
who still has a 800mhz...
03-27-2008, 03:16 AM#6
Ammorth
Sometimes I hate writing code on my computer. Unless I'm being stupid, my fps usually doesn't fall much.
03-27-2008, 12:02 PM#7
Toadcop
Quote:
My goal is to make the map playable in a pentium 3 800mhz with a geforce 2
= 1 hero + simplest flat terrain + some 4-6 creeps ^^ xD and anyway graphic will lag xD
03-30-2008, 01:23 PM#8
grupoapunte
LOL! it's not the computer i use for everything (i have a core duo 2), is an old computer that i have and im using it for testing stuff (other than wc3 maps). Yeah its very laggy i know but is nice to see that optimizing things is not useless hehe