• 🏆 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!

Number of variable causes lag or large file size?

Status
Not open for further replies.
Level 8
Joined
Jan 4, 2009
Messages
110
I have a question, does number of variable causes lag or increase file size?
If i have tons of variables to remove memory leak (which is to prevent lagging), does it causes lag itself?

Also will it (tons of var) increase map file size?

Thankyou,
 
Level 11
Joined
Sep 30, 2009
Messages
697
Hmm yeah 'tons' of variables will increase the filesize a bit but not really. Imports are the main problem when it comes to filesize. Maybe you could reduce you amount of variables if you make only one temporary variable of each type. Maybe post your map then we probably can help you better :)
 
Level 8
Joined
Jan 4, 2009
Messages
110
Ok thanks,
so number of var doesn't cause lag just slightly increase file size
i just need to know that :)




And also,
When testing map in Lan mode (Local game but play alone)
is it perform better than test map as single player or test map from WE..
or its just my feeling that its lag a little less
 
Declaring a lot of variables would reserve more resources for use of these variables, but the difference is negligible, even the size may increase only for a few kb for every thousand variables. However too much variables make a mess, because the variable editor becomes hard to read. For removing leaks, you don't have to worry, if there are no wait-like actions in trigger, you can freely use only one variable for each type (unless you use more different values in one trigger), because triggers don't overlap eachother if no wait function. If there are wait functions (for periodical effects like spells, not cinematics), well, then you are f**ked and you need to use locals (and that most probably means jass) to clear each leak.
 
Status
Not open for further replies.
Top