| 10-24-2003, 04:40 AM | #1 |
if you have a trigger that only runs one time, is it generally a good idea to have the last action of the trigger a "Destroy this trigger" for performance purposes? Especially if the trigger is large? |
| 10-24-2003, 04:46 AM | #2 |
A simple turn off trigger is all you need (if that even). No need to destroy them..... |
| 10-24-2003, 04:48 AM | #3 |
Destroying it may even lag. I wouldn't suggest either turning it off or destroying it anyways, if it is only run once, why turn it off? It won't run again anyways... At the point of destroying, it may lag, but it will make absolutely no difference what-so-ever to the performance of the game. At all. |
| 10-24-2003, 05:27 AM | #4 |
Thanx for the quick reply, the reason behind my asking was that I thought triggers might be stored in memory and that destroying one that isn't gonna run anymore would free up that memory. I am glad I asked. Thanx for the info. |
| 10-24-2003, 05:35 AM | #5 |
People worry about perfomance, but WE-generated JASS script is such not optimized so don't worry about perfomance - you will see NO difference! If you don't use JASS, of course. As for me, I use triggers to be executed one time hardly ever and if I need that trigger, I use dynamic trigger initialization and destroyng. After execution that trigger could be re-initialized and used for another tasks. |
