• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Unbelievable Lag

Status
Not open for further replies.
Level 18
Joined
Jul 14, 2008
Messages
1,349
Hey guys, i kinda need help, badly, i want to continue my cinematic 'TLS:Siege of Surchuri' but it's boring me, becuase, no matter what i do in the trigger editor, it lags. For E.g.
  • Part H5
    • Events
    • Conditions
    • Actions
      • Camera - Apply Camera 153 <gen> for Player 1 (Red) over 0.00 seconds
      • Camera - Apply Camera 154 <gen> for Player 1 (Red) over 5.00 seconds
      • Camera - Change camera smoothing factor to 2.00
      • Wait 2.00 seconds
      • Animation - Change Sharnae Yakobutso 0443 <gen>'s animation speed to 100.00% of its original speed
      • Animation - Change Raiken Yanobokuya 0455 <gen>'s animation speed to 100.00% of its original speed
      • Wait 2.50 seconds
      • Camera - Reset camera smoothing factor
      • Cinematic - Fade out over 0.50 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • Sound - Play swords <gen>
      • Wait 1.10 seconds
      • Sound - Play menu_slash <gen>
      • Wait 1.00 seconds
      • Unit - Unhide Musashi 0456 <gen>
      • Unit - Unhide Nagamasa Azei 0446 <gen>
      • Animation - Play Nagamasa Azei 0446 <gen>'s stand ready animation
      • Animation - Play Musashi 0456 <gen>'s stand ready animation
      • Animation - Play Raiken Yanobokuya 0455 <gen>'s stand ready animation
      • Unit - Move Raiken Yanobokuya 0455 <gen> instantly to (Center of Rect 124 <gen>)
      • Camera - Apply Camera 156 <gen> for Player 1 (Red) over 0.00 seconds
      • Camera - Apply Camera 157 <gen> for Player 1 (Red) over 15.00 seconds
      • Unit - Make Raiken Yanobokuya 0455 <gen> face Musashi 0456 <gen> over 0.00 seconds
      • Wait 0.25 seconds
      • Cinematic - Fade in over 0.50 seconds using texture White Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • Cinematic - Send transmission to (All players) from Raiken Yanobokuya 0318 <gen> named Raiken: Play No sound and display Argh! You two again.... Modify duration: Set to 5.00 seconds and Wait
      • Cinematic - Send transmission to (All players) from Musashi 0456 <gen> named Musashi: Play No sound and display Are you joking? I'v.... Modify duration: Set to 6.00 seconds and Wait
Now, everything there, that requires me, to select a 'Unit' or a 'Region' Lags, i don't know why, for example, when i 'send Transmission' from a unit, it says, 'Unit' , click on it. It takes 10 seconds to load the next dialog, where it says, 'Select A Unit' , which also takes 10 seconds to load.

Now, my map is about 1 hour long =/ so i don't know if that is the problem, but is there anything i can do to stop, or at least reduce this? because it is putting me off, finishing my map.
 
Level 18
Joined
Jul 14, 2008
Messages
1,349
Yes, i think it might just be because of the size of the map, because when i do other maps, it doesn't lag =/

Maybe this is the problem... too big/ too many triggers?
152860-albums4000-picture45616.jpg

152860-albums4000-picture45618.jpg

152860-albums4000-picture45617.jpg
 
Last edited:
Its all about performance, arrays are slower than normal variables...

as such, its unadvised to use arrays when you only use a few of its indexes (and they also take much space since they always create 8190 indexes, the size you put on the variable editor is just the indexes that would get initialized, but the others are still there)

You won't probably notice the difference for a few scripts, but if you run a lot of those scripts at roughly the same time, you would surely see the drop in performance, so if you only use a few indexes, just use different variables...

performance always comes before everything isn't it?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
(and they also take much space since they always create 8190 indexes, the size you put on the variable editor is just the indexes that would get initialized, but the others are still there)
As far as I am aware, jass arrays are dynamic arrays. This means they will allocate a new larger array and then copy the contense of the current array across before dealocating the current array and using the new larger array.
This is the only reason why vJASS uses arrays so heavilly, it would be difficult if each allocated 32 KB of space.
 
Status
Not open for further replies.
Top