Optimization
#2

Optimization includes tweaking and changing things to make them faster or take up less memory.
There's lots of small things you can optimize, the 4 i would encourage most are:

Decrease string sizes as much as possible, or atleast make sure when using SCM that they're not beyond 128.

Use includes like zcmd/ycmd (not dcmd) for faster commands, and foreach for faster player loops.

Redefine "MAX_PLAYERS" to the actual max player slots you have set on your server right after #include <a_samp>
An example of how to set it to 100 players:
Код:
#undef MAX_PLAYERS
#define MAX_PLAYERS 100
Don't save players when they disconnect, save them instantly when their things are changed that needs to be saved.
Otherwise the server hangs when players disconnect.
Reply


Messages In This Thread
Optimization - by Micko123 - 27.04.2016, 11:13
Re: Optimization - by CalvinC - 27.04.2016, 11:35
Re: Optimization - by Micko123 - 27.04.2016, 12:05
Re: Optimization - by Lumanov - 27.04.2016, 16:11
Re: Optimization - by Micko123 - 27.04.2016, 16:13

Forum Jump:


Users browsing this thread: 1 Guest(s)