What will be better, this ... or this ...
#7

Quote:
Originally Posted by Not available
Посмотреть сообщение
How come? The server will get a lot to handle at once instead of small queries. Make a function that updates the certain variable you want and stores in mysql/files whatever you use.
If you keep writing to a file or sending queries all the time (if there's a decent amount of players that use the features regularly) the server performance will be slower then If you saved all online player data once every 30 minutes and on OnPlayerDisconnect.

If you optimize the code It shouldn't create so called "lag spikes" either, and even If It did create a 1 second lag spike every 30 minutes, that would be better then have people lagging all the time instead.
Trust me, I'm currently using a script that does It like you suggested, and It doesn't work very well, one of the reasons I'm creating a new gamemode.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)