SA-MP Forums Archive
Cause of lagging - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Cause of lagging (/showthread.php?tid=467683)



Cause of lagging - Bondage - 04.10.2013

Hi there!
My server have 50+ players everyday and it lags like shit, it uses alot of CPU usage.
Server have a line of approximately 40000+, i know it might be the script issue but i would like to add it has 10000+ user accounts and my script is SQL R6.

What maybe the cause of these lag?


Re: Cause of lagging - Bondage - 05.10.2013

DUMP


Re: Cause of lagging - xXShadowXx - 05.10.2013

Your script probably isn't coded very efficiently.


Re: Cause of lagging - DanishHaq - 05.10.2013

I'd recommend you rescript it with proper indention, use a command processor, don't use too many filterscripts, i.e. integrate your filterscripts into your main GM. Make sure the lag isn't from your host either. Make sure you're freeing all the results that you store too if you're using MySQL, because that'll cause lag for sure.


Re: Cause of lagging - gtakillerIV - 05.10.2013

Also use MySQL R7 with caches. It was designed for servers with a high player base(well, that's what I think at least).


Re: Cause of lagging - DanishHaq - 05.10.2013

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Also use MySQL R7 with caches. It was designed for servers with a high player base(well, that's what I think at least).
Yea, it definitely works a lot quicker, but even older versions will work too. I know a friend who has a 700+ playerbase with R5, and it works fine but slower than R7+.