05.01.2014, 17:33
Quote:
|
That is really bad advice. If you have only 4 players online and your server supports 500, you are looping through 496 empty variables and, seeing as it is all single threaded, the server has to complete it before continuing further with the script causing lag.
I know what you are going to say 'that loop will continue in a couple ms'. True, but that shouldn't matter. If you finish your work in 3 hours and you know that you could've saved 2 hours if you just kept score of how many people are actually there, then you save 2 hours. Same goes for the server. The server could've done it in less ms and in those ms could've done something else, serve another player for instance. |


