Ok, I'm at a loss here... Help me find the lag spike?

HG-Bonfire

New Member
Reaction score
22
Something is lagging my map, severely over time. I first suspected leaks but I've thoroughly examined all of the triggers I have put up so far, and I can't find anything.

Rather than go through a long lengthy explanation detailing all the triggers and possibilities (It's late, it's dark, and I can't see the keyboard, making it much more difficult to type...) I'm just going to post the map up to see if anybody
else sees something thats leaking or lagging up the game, and then calling it a night...


Please help me out, if you can?

Map file moved further down.
 

Laiev

Hey Listen!!
Reaction score
188
Temporal Backlash:
Trigger:
  • Lightning - Create a Mana Flare lightning effect from source (Position of AA_TemporalCast) to target (Position of AA_TemporalTarget)

2 Leaks here, the 1º is "(Position of AA_TemporalCast) and the 2º is (Position of AA_TemporalTarget, point leak.

Create 2 variable and set it
Fix:
Trigger:
  • Set Variable1 = (Position of AA_TemporalCast)
    • Set Variable2 = (Position of AA_TemporalTarget)
    • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • Custom script: call RemoveLocation (udg_AA_TemporalCast)
    • Custom script: call RemoveLocation (udg_AA_TemporalTarget)


I just get a example with the first trigger, remember, ALL POINT MAKE LEAK.

Temporal Backlash Effect = 6 leaks
Mana Seekers = 3 leaks
Mana Seekers Effect = 1 leak
Rally = leakless
Rally Effect = leakless
Notification = leakless
Mine = leakless
Remote Mine Effect = leakless
Timed Mine Effect = leakless
Peasants = 1 leak
Guards = 2 leaks
Guard Wait = leakless
Guard Reset = leakless
Doors = leakless
Energy Switch = leakless

You make this terrain?
Cute ^_^
 

HG-Bonfire

New Member
Reaction score
22
I think the most severe offender is the leaks in the Peasants and Guards trigger. I noticed them soon after posting the thread, and they are leaking more and more every second..

Thank you for pointing these all out though, I definitely have to go search through my triggers again. (And update Firefox, lol)
 

HG-Bonfire

New Member
Reaction score
22
And, after spending time to find and fix all the leaks that Laiev pointed out, the lag spike still is happening...
 

HG-Bonfire

New Member
Reaction score
22
Constantly, from the start of the map, with increasing severity. Makes me guess that it might be one of the periodic triggers.
 

Faust

You can change this now in User CP.
Reaction score
123
Most likely.
Sorry I don't check your map, but be on a look out for creating/leaking periodically multiple
- regions
- many units
- unit groups
- special and lightning effects.
- any light infinite loops, that doesn't crash you instantly, but starts eating memory slowly instead.
 

HG-Bonfire

New Member
Reaction score
22
Ugh, I did a check through each individual trigger (Disable, then test), and the problem is the Door Trigger.



Problem is, the Door trigger is essential to the map, I can't just toss it out. I'm thinking that creating a destructible group is causing the leak, but I'm not sure how to remove it...


EDIT: Oh duh! There are two unit groups being made in there...

How did I miss those?

Ok lemme go fix that, lol...

Ok, took out the leaks on the original, and the Door trigger still lags... This is getting obnoxious...

Trigger:
  • Doors
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Destructible - Pick every destructible in Castle <gen> and do (Actions)
        • Loop - Actions
          • Set Temp_Point = (Position of (Picked destructible))
          • Set Temp_Unitgroup = (Units within 350.00 of Temp_Point matching (((((Owner of (Matching unit)) is an ally of Player 5 (Yellow)) Equal to True) or (((Matching unit) has an item of type City Key) Equal to True)) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))
          • Set Temp_Unitgroup2 = (Units within 350.00 of Temp_Point matching (((((Owner of (Matching unit)) is an ally of Player 5 (Yellow)) Equal to True) or (((Matching unit) has an item of type Skeleton Key) Equal to True)) and ((Owner of (Matching unit)) Not equal to Neutral Passive)))
          • Custom script: call RemoveLocation(udg_Temp_Point)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • (Number of units in Temp_Unitgroup) Greater than 0
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Destructible-type of (Picked destructible)) Equal to City Entrance
                          • (Destructible-type of (Picked destructible)) Equal to City Entrance
                          • (Destructible-type of (Picked destructible)) Equal to Gate (Horizontal)
                          • (Destructible-type of (Picked destructible)) Equal to Gate (Vertical)
                          • (Destructible-type of (Picked destructible)) Equal to Gate (Diagonal 1)
                          • (Destructible-type of (Picked destructible)) Equal to Gate (Diagonal 2)
                  • And - All (Conditions) are true
                    • Conditions
                      • (Number of units in Temp_Unitgroup2) Greater than 0
                      • Or - Any (Conditions) are true
                        • Conditions
                          • (Destructible-type of (Picked destructible)) Equal to Elven Gate (Horizontal)
                          • (Destructible-type of (Picked destructible)) Equal to Elven Gate (Vertical)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked destructible) is alive) Equal to True
                • Then - Actions
                  • Destructible - Open (Picked destructible)
                  • Destructible - Make (Picked destructible) Invulnerable
                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked destructible) is invulnerable) Equal to True
                • Then - Actions
                  • Destructible - Close (Picked destructible)
                  • Destructible - Make (Picked destructible) Vulnerable
                • Else - Actions
          • Custom script: call DestroyGroup(udg_Temp_Unitgroup)
          • Custom script: call DestroyGroup(udg_Temp_Unitgroup2)


What is doing it?
 

HG-Bonfire

New Member
Reaction score
22
I'm guessing it's just a large amount of code for the editor to process every second.

I increased the periodic to two seconds. It still lags, slightly, but I'm fairly certain that it isn't building up like it was when there were leaks gathering up.

I can settle for that.
 

Faust

You can change this now in User CP.
Reaction score
123
You could make a backup trigger, the copy of your current one, disable it, and try to delete parts of the enabled one. Get closer to the problem's core ^^

But indeed doing it with regions is a lot better.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top