Too big
#1

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
Reply
#2

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.
Reply
#3

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

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.
Reply
#5

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

use use stock for Stuff u use alot helps u..
Reply
#7

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.
Reply
#8

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

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

Can someone post link for optimization tutorials??
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)