One new string[] for all script.
#1

Recently i had some problems with the size of my arrays. Pawno gave me this:

Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           6428 bytes
Code size:           166072 bytes
Data size:           904192 bytes
Stack/heap size:      16384 bytes; estimated max. usage=10018 cells (40072 bytes)
Total requirements: 1093076 bytes
In order to avoid
pawn Код:
#pragma dynamic
i thought of using only one string for all the messages that needed format. So i did something like:
pawn Код:
new string[100];
and whenever i need to format a message that will be less than 100 characters i use this string. The problem with the size disappeared however I am concerned that this doesn't really change anything.
Is this going to reduce the memory used by the script and make the server lag less?
Reply


Messages In This Thread
One new string[] for all script. - by mike_1 - 29.12.2014, 13:18
Re: One new string[] for all script. - by MrCallum - 29.12.2014, 13:22
Re: One new string[] for all script. - by BroZeus - 29.12.2014, 13:26
Re: One new string[] for all script. - by Pottus - 29.12.2014, 13:31
Re: One new string[] for all script. - by mike_1 - 29.12.2014, 13:32
Re: One new string[] for all script. - by BroZeus - 29.12.2014, 13:38
Re: One new string[] for all script. - by mike_1 - 29.12.2014, 13:43
Re: One new string[] for all script. - by BroZeus - 29.12.2014, 13:47
Re: One new string[] for all script. - by mike_1 - 29.12.2014, 13:52
Re: One new string[] for all script. - by mike_1 - 29.12.2014, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)