Posts: 1,840
Threads: 399
Joined: Oct 2010
Reputation:
0
Hello All,
Whats better?
One big loop or multiple small loops?
I need this because i am using much variables as timers.
I need to fix the lag in my server.
Thanks Admigo
Posts: 541
Threads: 60
Joined: Jul 2009
Reputation:
0
One big loop.
About Timers the case is different ( more smaller timers, and make sure they are not executing at same time ).
Posts: 1,840
Threads: 399
Joined: Oct 2010
Reputation:
0
What stuff can make your server slower like: Players moving bad or chat is sending the message slower?
Because this is my problem with my server. After playing like 10 minutes that lag will be in server.
Posts: 1,317
Threads: 23
Joined: Feb 2010
Reputation:
0
It really depends on the amount of iterations in your loop and the stuff you do inside it. Do not place stuff under OnPlayerUpdate without any form of scheduling code. (only if you know what your doing). If you execute certain loops on a regular interval I'd say having multiple smaller loops is better because there'd be gaps in between where the server can do something else.
Posts: 1,840
Threads: 399
Joined: Oct 2010
Reputation:
0
Does a loop needs to have a return 1 or 0?
I have much incoming connections.