I've been pondering about that. There are obviously benefits, but doesn't this mean that they take up memory? And possibly processing power since you're setting variables? If those two are minimal, then I guess this will be good.
So what?
Rollback Post to RevisionRollBack
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.
Local Variable r removed from ram after the trigger or function executes, this helps keep your ram allocation low. However if you switch to global variables you will not see a difference since ram now a days is >1gb you would have a hard time filling it up.
as for setting them that doesn't cause much lag either. There might be a debate that if u change a variable continuously it might be faster to make it global but again this is negligible.
I would go with locals where you can. Depending on the amount of globals you have, use them either only when it's necessary, or if you have very few, where it's convenient.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I've been pondering about that. There are obviously benefits, but doesn't this mean that they take up memory? And possibly processing power since you're setting variables? If those two are minimal, then I guess this will be good.
So what?
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.
Local Variable r removed from ram after the trigger or function executes, this helps keep your ram allocation low. However if you switch to global variables you will not see a difference since ram now a days is >1gb you would have a hard time filling it up.
as for setting them that doesn't cause much lag either. There might be a debate that if u change a variable continuously it might be faster to make it global but again this is negligible.
Resource draining actives include,Large milt loops, many threads, rapid firing threads, actors, recursions.
I would go with locals where you can. Depending on the amount of globals you have, use them either only when it's necessary, or if you have very few, where it's convenient.