• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Pawn] [Solved] Why Game mode amx size has increased?
#1
I made some changes to the Game Mode today, after a few hours I saw that the size of Game Mode amx increased from 4 MB to 19 MB.

Compilation time also increased from 10 seconds to seconds.

I don't remember what I did that caused it

even I optimizing well.



Compiler:

Zeex - https://github.com/pawn-lang/compiler/releases



Game Mode Includes:

Code:
#include <a_samp>

#include <a_mysql>

#include? <jit>



#include "../include/nex-ac.inc"

#include <weapon-config>



#define YSI_NO_VERSION_CHECK

#undef MAX_PLAYERS

#define MAX_PLAYERS 200



#include?<streamer>

#include <colandreas>

#include <3DTryg>

#include?<sscanf2>

#include <YSF>

#include <PreviewModelDialog>

#include <progress2>

#include <mSelection>

#include <foreach>

#include <formatex>



Code:
Header size:? ? ? ? ? 32596 bytes

Code size:? ? ? ? ? 6266484 bytes

Data size:? ? ? ? 38666848 bytes

Stack/heap size:? ? ? 16384 bytes; estimated max. usage=3072 cells (12288 bytes)

Total requirements:44982312 bytes

[Finished in 67.0s]



Solved:



weapon-config include had caused this.
  Reply
#2
Quote:I saw that the size of Game Mode amx increase



Because:



Quote:I made some changes



Did you think changes would magically not change the AMX? If you add things, things get bigger.
  Reply
#3
(2021-05-12, 04:47 PM)Y_Less Wrote:
Quote:I saw that the size of Game Mode amx increase



Because:



Quote:I made some changes



Did you think changes would magically not change the AMX?? If you add things, things get bigger.



When viewed from its function. You can see that the size of the power usage in Pawno compared to VSCode is very far too. VSCode which has many features makes it feel very slow on a laptop with makeshift features like I use. So I think the compiled results in the new version of Pawn are not supported by the virus to load RAM while running the server. But my question is when creating a gamemode that people make. Why is there a play.exe program in the pawno folder? Is Play.exe a malware?



[Image: fmM6DSN.png]
  Reply
#4
I went back to the old versions of Game Mode pwn and I compiled those but it also AMX size more than 19 MB.

I'm sure those versions didn't have this problem.

I tried other compilers but it didn't change.



Now I don't think the problem is with the game mode.



I tried very hard to understand where the problem came from.

Never mind...



(2021-05-12, 04:47 PM)Y_Less Wrote: Did you think changes would magically not change the AMX?? If you add things, things get bigger.



I know.

But so far I have not done anything to make AMX more than 10 MB.

I have 3 other Game modes with more than 60,000 lines, but their size has never been more than 10 MB





(2021-05-12, 05:35 PM)PutuSuhartawan Wrote: When viewed from its function. You can see that the size of the power usage in Pawno compared to VSCode is very far too. VSCode which has many features makes it feel very slow on a laptop with makeshift features like I use. So I think the compiled results in the new version of Pawn are not supported by the virus to load RAM while running the server. But my question is when creating a gamemode that people make. Why is there a play.exe program in the pawno folder? Is Play.exe a malware?



That is the some russian guy compiler.

No source code.
  Reply
#5
Number of lines are irrelevant - I can write a 1 line mode that's several gigabytes. Code takes space, and different code takes different space. What exactly do you think the problem is? How much RAM do you have?
  Reply
#6
(2021-05-12, 07:34 PM)Radical Wrote: That is the some russian guy compiler.

No source code.



Sorry sir I have a question. Can you guarantee that play.exe is not a virus? because previously I had experience with GTA files which generally also speak like that but it turns out that in the end my laptop got a virus and the laptop's performance became slow, ahaha it's tragic even though at that time I trusted the program because I had often used the service but in the end I had been hit by a troublesome virus. I also now have no virus defense because the defender works harder than the virus.
  Reply
#7
Quote: Can you guarantee that play.exe is not a virus



No, that's why no-one uses it.
  Reply
#8
(2021-05-13, 01:20 PM)Y_Less Wrote:
Quote:Can you guarantee that play.exe is not a virus



No, that's why no-one uses it.



Thanks a lot sir.
  Reply
#9
I found the problem. This is weapon-config issue.



I changed



Code:
#include <weapon-config>



#define YSI_NO_VERSION_CHECK

#undef MAX_PLAYERS

#define MAX_PLAYERS 200



to



Code:
#define YSI_NO_VERSION_CHECK

#undef MAX_PLAYERS

#define MAX_PLAYERS 200



#include <weapon-config>



and it was solved.



weapon-config include?has a lot of arrays and variables with 1000 size.

MAX_PLAYERS?was 1000 as by default. That's what caused it.
  Reply
#10
(2021-05-13, 10:07 PM)Radical Wrote: I found the problem. This is weapon-config issue.



I changed



Code:
#include <weapon-config>



#define YSI_NO_VERSION_CHECK

#undef MAX_PLAYERS

#define MAX_PLAYERS 200



to



Code:
#define YSI_NO_VERSION_CHECK

#undef MAX_PLAYERS

#define MAX_PLAYERS 200



#include <weapon-config>



and it was solved.



weapon-config include?has a lot of arrays and variables with 1000 size.

MAX_PLAYERS?was 1000 as by default. That's what caused it.

Michael coding ? 2021
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply
#11
(2021-05-13, 10:07 PM)Radical Wrote: I found the problem. This is weapon-config issue.



I changed



Code:
#include <weapon-config>



#define YSI_NO_VERSION_CHECK

#undef MAX_PLAYERS

#define MAX_PLAYERS 200



to



Code:
#define YSI_NO_VERSION_CHECK

#undef MAX_PLAYERS

#define MAX_PLAYERS 200



#include <weapon-config>



and it was solved.



weapon-config include?has a lot of arrays and variables with 1000 size.

MAX_PLAYERS?was 1000 as by default. That's what caused it.



Cool you find it. Now the script can be rethought that the path starts at the left then right and goes down. How do you rebel so that the script runs from the opposite direction, namely from the right and then the arrangement of the road to the top?
  Reply
#12
(2021-05-14, 10:17 AM)PutuSuhartawan Wrote: Cool you find it. Now the script can be rethought that the path starts at the left then right and goes down. How do you rebel so that the script runs from the opposite direction, namely from the right and then the arrangement of the road to the top?

I don't understand what you mean.
It run/compile from top to bottom.
  Reply
#13
(2021-05-14, 09:17 PM)Radical Wrote:
(2021-05-14, 10:17 AM)PutuSuhartawan Wrote: Cool you find it. Now the script can be rethought that the path starts at the left then right and goes down. How do you rebel so that the script runs from the opposite direction, namely from the right and then the arrangement of the road to the top?



I don't understand what you mean.

It run/compile from top to bottom.



I just explained that everyone has their own path and side. There are people who are extreme left-aligned. There are also right-aligned people.
  Reply


Forum Jump: