Warcraft III resources & community, 2003–2006 · archived

How to reduce lag in my trigger

13 posts
#2
The position of the picked unit leaks. You need to assign its position also into a variable and remove the location after.
#3
actually, good job, it doesn't leak. buy dsl
#4
Mini-MeThe position of the picked unit leaks. You need to assign its position also into a variable and remove the location after.

I understand the variable part, but what function does the destroy location/group/ect have?
#5
Low-life - Its actually leaking inside the PolarProjection junk.
#6
oh.. yeah.

Set p1=position of picked Unit
Set p2=polar projection
()
Removelocation(p2)
Removelocation(p1)
#7
Found a better solving:

Custom Script : set bj_wantDestroyGroup=true
If you pick each unit in playable map arena and check
- Unit is in TMPPickUnit1 equal to true
Than do...

Custom script removes the group from cache

also check to remove unit points ( they are most laggy )

Simply Use a point variable and set it to the position of checked unit. It works with 1000000000 ( endless ) unit positions if its used in a picked unit action.

Have fun with creating.
#8
I personally prefer set bj_wantDestroyGroup = true (if I'm working in GUI, which is only when I'm showing someone how to do something) as you said, DHK, cause it doesnt need any custom variables, but every person for himself.
#9
Yeah so true .. But still remember that bj_wantDestroyGroup=true removes groups ( Delete / destroy ) from game!!

Also if you have

Set bj_wantDestroyGroup=true
Pick every unit in *mygroup* and do
...

the group *mygroup* wont be able to be used any longer.
All future actions wont work.

But if you check with

Set bj_wantDestroyGroup=true
Pick every unit in playable map area and do
if picked unit is in *mygroup* equal to true
than do...
else do...

The group is already alive and can be used for actions and so on.
#10
But then again, *mygroup* leaks in that case.
#11
That leak is SOOOO smaLL!... Got ~ 200 ~ checks in my Sunken ForceStrike map each second and its nearly unlaggy!! O_O
#12
A) Its not small. It can cause really ugly lag. If you arent getting any from 200 a second, you have a REALLY good computer. And try leaving your comp on for 30m or so, and bad things will happen.

B) There is no reason not to clean up leaks. Thats like saying "getting poked with a needle doesnt really hurt, so i'll do it", and then poking yourself 1000000 times. Its like commiting suicide with a rusty cheese grater :P
#13
I have a normal 2,2 GHZ Amd Athlon PC with 256 mb workcache. Ok , with speedbooster but not so much.

I dont now what you really want!...

I noticed this :

Pick every unit in playable map area and do
^^
This saves EVERY unit in the cache. ( wont be removed by jass scripts )

Create a Special effect at ( Position of picked unit )
^^
Special effects wont be removed if you destroy them with trigger. They are already alive in the cache.
^^ ( part 2 : position )
The position of the unit will be saved. Only this part can full deleted from cache.

Always noticed that the other things are required for replays and so on. Also you cant clear the cache to nothing. I prefer cache safing and loading cause its the best way to decrase the load-after-time-after-a-map-was-played very much.

BUt anyways , everybody have to handle it himself.
:wink: