• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Triggers Calling Triggers - Lag?

Status
Not open for further replies.
Level 2
Joined
Jan 6, 2013
Messages
11
Hello again,
I'm working on a trigger that will be firing very often, and hence I want it to be efficient as possible (every time a unit is attacked in a high population map). I was wondering which scenario causes more lag, assuming equal actions overall: a trigger that runs another trigger, or a trigger with all the actions within it.

So, to model the problem, would this set of triggers...

Trigger Example A
Event: X
Conditions: Y
Actions: Run Trigger Example A1

Trigger Example A1
Actions: Z

Cause more lag than this trigger...

Trigger Example B
Event: X
Conditions: Y
Actions: Z

Considering they perform the exact same actions, I would think any lag experienced would be the same. But on the other hand, Trigger A/A1 does include the extra 'step' of pointing to the external trigger, so I'm not sure. I'm no computer expert so maybe this question is laughably simplistic or I'm making mountains out of molehills, but any insight would be appreciated!
 
Level 2
Joined
Jan 6, 2013
Messages
11
Well folks I tested two sets of triggers with Fraps. The first trigger comparison involved a RNG that spat out either 'o' or '.' every .01 seconds, and both got 60 fps. Then I did the same thing but changed the event to 'Generic - A Unit is Attacked' and both got 12 fps. So it doesn't seem to matter whether the actions are executed within the trigger or are called externally. I'd just qualify my results by noting that the battle sequences were ad hoc, so there weren't exactly the same number of units in each test, but close enough for my purposes.

TL;DR: The scenarios are equal.
 
Status
Not open for further replies.
Top