For less server lag - 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: For less server lag (
/showthread.php?tid=311219)
For less server lag -
Larry123 - 15.01.2012
Hello
This makes server very laggy, if i put top of my script new string[300]; and always, bottom of my script use format(string, sizeof(string), "Text..");
I mean, if i define lot of string top of my script and maybe sometimes i use in formats only 40 characters. Is it very laggy then ?
Re: For less server lag -
rati555 - 15.01.2012
https://sampforum.blast.hk/showthread.php?tid=55261 read this
Re: For less server lag -
Larry123 - 15.01.2012
Hmm but about lagg, when is more lagg, if i put top of the script new stri[128]; and i use it always in formats, or if i put next to every format new "new stri[Characters number]" ?
Re: For less server lag -
Larry123 - 15.01.2012
Maybe somebody knows? And you may tell me more ways to make less lagg in server :P
Re: For less server lag -
Face9000 - 15.01.2012
Some tips about the cells strings.
If you are defining a playername,u can use new sting[24]; - It's enough.
For messages,i think [128] cells are enough too.
Remove the useless timers OnGameModeInit or another place.
Re: For less server lag -
Kingunit - 15.01.2012
Do you use OnPlayerUpdate?
Re: For less server lag -
Gh05t_ - 15.01.2012
Quote:
Originally Posted by Kingunit
Do you use OnPlayerUpdate?
|
This is most UNLIKELY to be the issue. Inefficient coding may relate to server lag, though this may also be predetermined by computer statistics and analysis (memory, CPU) which plays an important role. Optimization refers to more effective and efficient execution of code (in programming). ******'s topic
https://sampforum.blast.hk/showthread.php?tid=57018, explains this in-depth.