• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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