| 06-04-2009, 06:33 PM | #1 |
From what I've been told, too many timers is a major cause for "lag" (never confirmed those, so if it isn't true, do inform me). A map concept I'm aiming for requires A LOT of timers (at least 168), and I was wondering, which would be better on performance... Actually do all timers for what I need -or- Make a periodic event that's about .5 seconds, pile all the data I want for all the timers, into a set of arrays or a struct with their "duration". Every .5 seconds it will decrement a set time value by .5 for every slot/sheet, and if the value becomes less than .5 after decrementing it will pass it over to a timer. |
| 06-04-2009, 07:05 PM | #2 |
Timer lag, excluding code executed by those timers, is proportional to the number of times they expire. What are you planning to do? |
| 06-04-2009, 07:08 PM | #3 |
If you aren't using it already, you should check out TimerUtils, it might be useful, depending on your answer to Griffen's question. |
