Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
well,each time i add a system my gamemode gets more mb....like now i added a small system,no bugs and from 7mb went to 9mb,is that okay ,and what could make it increase like that?
Posts: 1,661
Threads: 47
Joined: May 2013
Reputation:
0
Your .amx size increases depending on how you write your systems. You can decrease it by generally optimizing your code.
For example, fixing string sizes: there's no point defining 128 characters when you only need 50. The same goes for huge unnecessary arrays.
Also, fix your loops by using foreach; and by changing values you use to loop. To give you an example: if you don't have 500 players or vehicles, don't loop through 500 players/vehicles. Redefine the value to the amount of players or vehicles you have.
PS: 7 MB is alot, I personally never got more than 4 MB.
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
That doesnt only happen when i add systems,i tried now changing the hostname from the gamemode from Test to Test Test,it gave me it became from 9000000 kb to 9,000,420 kb
Posts: 1,241
Threads: 67
Joined: Dec 2013
Don't forget, There are a lot of causes which may make your Amx size big, Includes can cause that too, It depends on the memory they use.
I don't think the server will lag because of the amx file is big, It will just take time on uploading it
![Smiley](images/smilies/smile.png)
.