PDA

View Full Version : Too big


Micko123
03/05/2016, 03:02 PM
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 :D :D :D

Sjn
03/05/2016, 03:11 PM
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.

Dayrion
03/05/2016, 03:56 PM
Mine is over 4MB too. I never optimized him. xD
It's hard to optimize a whole script.

kaisersouse
03/05/2016, 03:57 PM
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.

cdoubleoper
03/05/2016, 04:02 PM
Try to decrease the size of some of your global arrays, if possible.

Naresh
03/05/2016, 04:08 PM
use use stock for Stuff u use alot helps u..

PrO.GameR
03/05/2016, 04:27 PM
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.

Dayrion
03/05/2016, 04:35 PM
6MB! :O
Bigger the size is, longer the time when you are compilating is ? (My sentence is right?)

Micko123
03/05/2016, 05:36 PM
Yes. Time used for compiling is abot 10-15 sec.

Can someone post link for optimization tutorials??

Micko123
03/05/2016, 05:39 PM
But this happened when i updated my YSI include. When i tried to remove some folders compiler showed errors. Can someone help me with this. It has to be YSI

kaisersouse
03/05/2016, 05:42 PM
Im sure it is YSI.

What were having trouble with is: how is this a problem?

Micko123
03/05/2016, 06:01 PM
Im sure it is YSI.

What were having trouble with is: how is this a problem?

But i have no idea what to delete and what to leave there. I have tons of YSI files
Here are pics:

http://imgur.com/a/0nMOC

Sjn
03/05/2016, 06:02 PM
use use stock for Stuff u use alot helps u..

No, that's stupid. Check this http://forum.sa-mp.com/showthread.php?t=570635


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

Can someone post link for optimization tutorials??

These might help you out

The original thread by ****** was removed afaik, this is the new one I guess which also has good explanations; http://forum.sa-mp.com/showthread.php?t=580289

And this is a tips and tricks thread by Slice; http://forum.sa-mp.com/showthread.php?t=216730

Darkwood17
03/05/2016, 08:03 PM
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: http://forum.sa-mp.com/showthread.php?t=580165
Another optimizations topic: http://forum.sa-mp.com/showthread.php?t=606026