General Question About Timers
#6

Quote:
Originally Posted by jonrb
Посмотреть сообщение
I'd like to bump this, if I may. Is there anybody out there with a good idea of how to guage the effects of timers on CPU usage?
The only thing that would affect timers is if the function that the timer is calling is really un-optimized.

When i was new to scripting people always told me the same misconception that timers are bad, they cause high cpu issues, use as few timers as possible, and i had tons of code that was extremely slow under one timer. And wouldn't you know, my server used a decent amount of cpu usage per player cause it was running everything at once. I then used more timers splitting things up, and guess what, my cpu issues were gone and the server even had better sync and less issues with timeouts.

So from my own experience, the entire misconception about timers is quite wrong. Watch what your calling with each timer and make sure the code that is being executed by each timer isn't massive loops inside more loops that have another while loop......you should know where i'm trying to get at. The same goes for onplayerupdate.
Reply


Messages In This Thread
General Question About Timers - by jonrb - 23.12.2014, 19:32
Re: General Question About Timers - by Pottus - 23.12.2014, 19:55
Re: General Question About Timers - by iKyle - 23.12.2014, 20:18
Re: General Question About Timers - by jonrb - 23.12.2014, 20:20
Re: General Question About Timers - by jonrb - 26.12.2014, 18:44
Re: General Question About Timers - by nickdodd25 - 26.12.2014, 22:02

Forum Jump:


Users browsing this thread: 1 Guest(s)