SA-MP Forums Archive
Should I be concerned about this AMX 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: Should I be concerned about this AMX size? (/showthread.php?tid=601857)



Should I be concerned about this AMX size? - Dokins - 27.02.2016

After noticing my AMX file is 85MB and my PWN is 992KB I was concerned that the AMX shouldn't be that much...Would this have any affect on game play?

I'm almost about to cry, but any advice would help.

Thanks,
Grant.


Re: Should I be concerned about this AMX size? - SyS - 27.02.2016

no but sometimes the amx file size may effect as due to false compilations (runtime errors) and increased array indexes
but for file size 999kb 85 mb is good


Re: Should I be concerned about this AMX size? - Dokins - 27.02.2016

I did have a slight heart attack. Thank you for your kind reply. I appreciate it.


Re: Should I be concerned about this AMX size? - Infinity - 27.02.2016

Do you perhaps have unreasonably large arrays? An increase of that magnitude seems a bit odd.


Re: Should I be concerned about this AMX size? - Dokins - 27.02.2016

Uhhh, I've been through them, not really seeing anything abnormal entirely.


Re: Should I be concerned about this AMX size? - justinnater - 27.02.2016

One current gamemode that I have is 75mb and nothing is wrong with it.
Reason for that was the high limit of arrays / defines


Re: Should I be concerned about this AMX size? - Michael B - 27.02.2016

Well, most of the gamemodes I've seen did not exceed the size of 10mb.
The compiled file size depends not only on the gamemode size itself, but also on the includes. This being said, I assume that most of your script consists in includes.


Re: Should I be concerned about this AMX size? - Dokins - 27.02.2016

Most of it is actually in the game mode itself, I don't use many includes.


Re: Should I be concerned about this AMX size? - Virtual1ty - 27.02.2016

Using lots of switch cases (eg. case 0...100000) can also cause bigger .amx size.
You definately should be concerned, not that the server couldn't handle it, but it's just a waste of space, normal compiled gamemodes with lots of features should be 10-30 MB max.


Re: Should I be concerned about this AMX size? - izeatfishz - 27.02.2016

This is a concern, you probably are using oversized strings or infinite loops or leaking memory.