SA-MP Forums Archive
Too big - 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: Too big (/showthread.php?tid=606379)



Too big - Micko123 - 03.05.2016

Hey guys. I was wondering how can i resize .amx file. I already removed all buildings in filterscript, and using them in filterscript instead of directly in gamemode. My gamemode size is over 4MB. What can i do?? Thank you


Re: Too big - Sjn - 03.05.2016

You need to learn how to optimize your code, there are few tutorials on this forum, you better read them. The first thing I can tell you right now is, avoid using huge array cells.


Re: Too big - Dayrion - 03.05.2016

Mine is over 4MB too. I never optimized him. xD
It's hard to optimize a whole script.


Re: Too big - kaisersouse - 03.05.2016

This will also occur if you are using a ton of huge includes like YSI, etc. Make sure you actually NEED the includes that are in your script.


Re: Too big - cdoubleoper - 03.05.2016

Try to decrease the size of some of your global arrays, if possible.


Re: Too big - Naresh - 03.05.2016

use use stock for Stuff u use alot helps u..


Re: Too big - PrO.GameR - 03.05.2016

How is 4MB too much? mine is 8MB (Although like 6MB of it is House's array) and it's still low in my opinion, however the best optimization you could do is learn how to work with foreach, and use it on your huge arrays or almost anything with an index bigger than 100.


Re: Too big - Dayrion - 03.05.2016

6MB! :O
Bigger the size is, longer the time when you are compilating is ? (My sentence is right?)


Re: Too big - Micko123 - 03.05.2016

Yes. Time used for compiling is abot 10-15 sec.

Can someone post link for optimization tutorials??


Re: Too big - Darkwood17 - 03.05.2016

Quote:
Originally Posted by Naresh
Посмотреть сообщение
use use stock for Stuff u use alot helps u..
It won't help you. Use normal functions instead of stock as Sjn said.

Make sure you don't use huge string sizes. Check out this: https://sampforum.blast.hk/showthread.php?tid=580165
Another optimizations topic: https://sampforum.blast.hk/showthread.php?tid=606026