Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] [Solved] Why Game mode amx size has increased?

 
  • 0 Vote(s) - 0 Average
Pawn [Solved] Why Game mode amx size has increased?
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#1
2021-05-12, 04:18 PM (This post was last modified: 2021-05-20, 12:18 AM by Radical.)
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 +60 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.
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#2
2021-05-12, 04:47 PM
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.
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#3
2021-05-12, 05:35 PM (This post was last modified: 2021-05-12, 05:41 PM by PutuSuhartawan.)
(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]
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#4
2021-05-12, 07:34 PM (This post was last modified: 2021-05-12, 07:49 PM by Radical.)
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.
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#5
2021-05-12, 09:19 PM
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?
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#6
2021-05-13, 11:13 AM
(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.
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#7
2021-05-13, 01:20 PM
Quote: Can you guarantee that play.exe is not a virus

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

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#8
2021-05-13, 01:32 PM
(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.
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#9
2021-05-13, 10:07 PM (This post was last modified: 2021-05-13, 10:17 PM by Radical.)
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.
Pinch
Offline

Burgershot Member
Posts: 391
Threads: 19
Joined: Apr 2019
Reputation: 22
Location: Belgrade, Serbia
#10
2021-05-13, 11:07 PM
(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.
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#11
2021-05-14, 10:17 AM
(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?
Radical
Offline

Burgershot Member
Posts: 148
Threads: 21
Joined: Dec 2020
Reputation: 16
#12
2021-05-14, 09:17 PM (This post was last modified: 2021-05-14, 09:18 PM by Radical.)
(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.
PutuSuhartawan
Offline

Burgershot Member
Posts: 120
Threads: 52
Joined: Nov 2020
Reputation: 1
Location: Indonesia
#13
2021-05-14, 11:48 PM
(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.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode