server process difficult...
#1

When my server server exceeds 180 players begin to process difficult. (180+ players on‌line = server lag)
I do not understand why...

My GameMode:
Runs 3 GlobalTimers. (1 = 600ms | 2 = 1 seconds | 3 = 4 minutes)
Use ZCMD + MYSQL R39.
Код HTML:
public OnPlayerUpdate(playerid)
{
    playerInfo[playerid][AFKTime] = 0;
    return 1; 
}
Reply
#2

anyone?
Reply
#3

Probably weak host.
Reply
#4

Not, host is ok.
Reply
#5

Run profiler plugin. The amount of timers in itself tells nothing. Twenty timers with 5 lines of code will still be faster than 3 timers with 200 lines of code. One tip is to use prime numbers for the timer intervals so the amount of conflicts are reduced to a minimum; every 3 seconds the 600ms and the 1s timer will converge and execute at the exact same time.
Reply
#6

Quote:
Originally Posted by Vince
Посмотреть сообщение
Run profiler plugin. The amount of timers in itself tells nothing. Twenty timers with 5 lines of code will still be faster than 3 timers with 200 lines of code. One tip is to use prime numbers for the timer intervals so the amount of conflicts are reduced to a minimum; every 3 seconds the 600ms and the 1s timer will converge and execute at the exact same time.
Thank you.
Is ok?
Код HTML:
SetTimer("SpeedometerUpdate", 600, 1);
SetTimer("gTimer", 1040, 1);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)