I have a periodic event that instantly moves a unit whenever arrow keys are pressed every 0.05 seconds.
The strange thing is that when I first launch the map, it works but causes a steady decline in frame rate. After around 10 seconds of move-testing, framerate falls below acceptable levels.
So I release the keys, framerate goes back to 100+. When I start pressing again it drops dramatically.
The longer the keys are held down, the lower the framerate goes..
I really don't understand why this is happening, The trigger debugger indicates everything is working fine.
My question is.. Does anyone know what might be causing this problem?
I've attached the map to make it easier to check.. Its the Custom Script movement trigger.
Updates
Tested with 0.10 seconds. Problem doesn't seem to happen but motion isn't fluid enough. Thus it is absolutely necessary to use 0.05 seconds.
I'm under suspicion there might be a leak of sorts somewhere.
Removed the unit repositioning function. Problem still occurs.. only thing left is the local variables..
Removed everything else.. Its just a periodic trigger that returns true and it still happens.. wtf?... talk bout shitty garbage collection.
Attempted to destroy trigger and recreate it after every 100 cycles.. problem still occurs. Suspecting timer is leaking..
Everytime a trigger runs (with debugger active) the debugger gathers information about this run - how long did it take? What did run? Did it fail? Did it create a thread? etc.
That takes some time.
Especially if you have a trigger like Move Unit which probably runs like 16 times a second.
I have a periodic event that instantly moves a unit whenever arrow keys are pressed every 0.05 seconds.
The strange thing is that when I first launch the map, it works but causes a steady decline in frame rate. After around 10 seconds of move-testing, framerate falls below acceptable levels.
So I release the keys, framerate goes back to 100+. When I start pressing again it drops dramatically.
The longer the keys are held down, the lower the framerate goes..
I really don't understand why this is happening, The trigger debugger indicates everything is working fine.
My question is.. Does anyone know what might be causing this problem?
I've attached the map to make it easier to check.. Its the Custom Script movement trigger.
Updates
@FuzzYD: Go
It's 'cause of the debugger :P
Disable him in the editors options :)
He sadly doesn't like many events =(
I've got 110 fps on max settings without the debugger, if you need that bit of information.
@Ousnius: Go
you're right its the debugger -_- i feel like i've just been betrayed by my best friend. the bastard. lol
The debugger does that? That's so lame. Like FuzzYD said, it's like my best friend. :(
@StatusQ3: Go
Everytime a trigger runs (with debugger active) the debugger gathers information about this run - how long did it take? What did run? Did it fail? Did it create a thread? etc. That takes some time. Especially if you have a trigger like Move Unit which probably runs like 16 times a second.
hmm
may i make a simple bechmark for sc2 functions