SA-MP Forums Archive
Normal .AMX file size - 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: Normal .AMX file size (/showthread.php?tid=495716)



Normal .AMX file size - AA9 - 18.02.2014

How much it should be? My GM lehgth is about 16K rows and my AMX file is 4.5MB big. Is that litte bit much?


Re: Normal .AMX file size - Raza2013 - 18.02.2014

you're using Y_INI?


Re: Normal .AMX file size - Pottus - 18.02.2014

That isn't large at all.


Re: Normal .AMX file size - AA9 - 18.02.2014

No, but i use these includes. Also i have tried to optimize my variable sizes.
pawn Код:
#include <a_samp>
#include <a_mysql>
#include <sscanf2>
#include <zcmd>
#include <streamer>
#include <mSelection>
#include <F_streamer>
#include <OPSP>
#include <crashdetect>



Re: Normal .AMX file size - Pottus - 18.02.2014

Your worrying too much over the most frivolous aspects of your gamemode there is nothing wrong.


Re: Normal .AMX file size - AA9 - 18.02.2014

My friend told me, that his GM is 25k rows and his AMX file is only 1.5MB big.


Re: Normal .AMX file size - AA9 - 18.02.2014

So what should i to, to decrase AMX file size more.


Re: Normal .AMX file size - PowerPC603 - 18.02.2014

Do you have some big arrays in there with alot of data?
That matters more than just code.

pawn Код:
new array[1024][1024][32];
Just adding this array to my own code increases AMX size from 351 Kbytes to 37 Mbytes.

But 4.5 Mbytes isn't much to worry about.

You could search your script and see if u need to shrink some arrays if you have alot of them with unused indices.


Re: Normal .AMX file size - Konstantinos - 18.02.2014

https://sampforum.blast.hk/showthread.php?tid=57018


Re: Normal .AMX file size - Yashas - 18.02.2014

Don't try to optimize your code for memory too much(except at some situations). Optimize where optimizing memory doesn't effect the CPU at all(like making a client message 256 cells big).

Its because you get plenty of memory(RAM) to use and CPU is more important.

You needn't actually worry about your AMX size and don't try to optimize for the sake of reducing the file size instead try to optimize your code for better performance.

How to optimize code:
https://sampforum.blast.hk/showthread.php?tid=216730
https://sampforum.blast.hk/showthread.php?tid=57018
https://sampforum.blast.hk/showthread.php?tid=486877