For less server lag
#1

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 ?
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=55261 read this
Reply
#3

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]" ?
Reply
#4

Maybe somebody knows? And you may tell me more ways to make less lagg in server :P
Reply
#5

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.
Reply
#6

Do you use OnPlayerUpdate?
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)