HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Many short triggers vs a few long triggers, optimizing map for best performance

01-16-2007, 07:06 PM#1
grupoapunte
Hey, I made a big map, and now after a year of improvment expansion and testing im close to the final release, and im looking to optimize the map as much as posible in order to close the project for ever. My map has 117 triggers, half of them are JASS, the map has no fixable leaks, but in order to make the code more readable and to alow others to undestand how the map works, the triggers are ordered by category (for example: trading system, custom spells, units spawn, ...) so some triggers respond to the same event, for example i have 5 triggers that respond to EVENT_PLAYER_UNIT_PICKUP_ITEM and since the units that pick up the items can be created at anytime, i use "AnyUnitEvent" so for this case what gives more performance, the 5 actual triggers or 1 trigger with if's and elseif's that swich betwen the acctions?
And the same for all the triggers that respond to the same events, also whats better a huge start trigger, or small ones that fire after X time elapsed to ensure secuence?

Thanks!
01-16-2007, 07:12 PM#2
evilmapcreater
id go with the fewer big triggers as long as it dosent leak or mess anything up or any thing like that. And you sve a lil bit of "Memory" other wise it rly dosnt matter.
01-16-2007, 07:23 PM#3
Vexorian
Overall this won't affect performance at all.