B bridge1 Member Feb 12, 2025 #1 Is it possible to add in the B4a (Basic for Android) IDE configuration options the ability to customize the maximum memory (XMX) parameter to compile projects? To be clear, the following parameter: [CODE title="Shell Script"] "C:\Java\jdk-19.0.2\bin\javac.exe" -J-Xmx2048m -d shell\bin\classes -bootclasspath "C:\Android34\platforms\android-34\android.jar" -Xmaxerrs 1 -nowarn -Xlint:none -target 8 -source 8 -version -encoding UTF-8 -cp "C:\Program Files\Anywhere Software\B4A_1300\libraries\jdebugrapid.jar";shell\bin\classes\ shell\src\project\test\main_subs_0.java "C:\Java\jdk-19.0.2\bin\java.exe" -Xmx2048m -cp "C:\Android34\tools\..\build-tools\34.0.0\lib\d8.jar" com.android.tools.r8.D8 @d8_arguments.txt [/CODE]
Is it possible to add in the B4a (Basic for Android) IDE configuration options the ability to customize the maximum memory (XMX) parameter to compile projects? To be clear, the following parameter: [CODE title="Shell Script"] "C:\Java\jdk-19.0.2\bin\javac.exe" -J-Xmx2048m -d shell\bin\classes -bootclasspath "C:\Android34\platforms\android-34\android.jar" -Xmaxerrs 1 -nowarn -Xlint:none -target 8 -source 8 -version -encoding UTF-8 -cp "C:\Program Files\Anywhere Software\B4A_1300\libraries\jdebugrapid.jar";shell\bin\classes\ shell\src\project\test\main_subs_0.java "C:\Java\jdk-19.0.2\bin\java.exe" -Xmx2048m -cp "C:\Android34\tools\..\build-tools\34.0.0\lib\d8.jar" com.android.tools.r8.D8 @d8_arguments.txt [/CODE]
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2025 #2 Have you encountered an out of memory error? You can change it by modifying MaxRamForDex in the INI file. Change it while the IDE is closed. %AppData%\Anywhere Software\Basic4android\b4xV5.ini
Have you encountered an out of memory error? You can change it by modifying MaxRamForDex in the INI file. Change it while the IDE is closed. %AppData%\Anywhere Software\Basic4android\b4xV5.ini
B bridge1 Member Feb 18, 2025 #3 Thanks for the reply. We do NOT encounter a problem of missing RAM, in fact during the compilation we have 8gb available before starting the compilation. we have verified that by raising the parameter value to 6gb (-Xmx6144m) the problem persists, that is, the compilation is too slow. We would have the doubt that during the compilation operations, NOT all the available CPUs are used. Is there any trace file of the compilation operation, which highlights which hardware resources are used? Specifically, display the number of available CPUs Runtime.getRuntime().availableProcessors() Runtime (Java SE 19 & JDK 19) declaration: module: java.base, package: java.lang, class: Runtime docs.oracle.com
Thanks for the reply. We do NOT encounter a problem of missing RAM, in fact during the compilation we have 8gb available before starting the compilation. we have verified that by raising the parameter value to 6gb (-Xmx6144m) the problem persists, that is, the compilation is too slow. We would have the doubt that during the compilation operations, NOT all the available CPUs are used. Is there any trace file of the compilation operation, which highlights which hardware resources are used? Specifically, display the number of available CPUs Runtime.getRuntime().availableProcessors() Runtime (Java SE 19 & JDK 19) declaration: module: java.base, package: java.lang, class: Runtime docs.oracle.com
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2025 #4 Can you post the compilation window text?
B bridge1 Member Feb 19, 2025 #5 B4A Version: 13.00 Parsing code. (4.28s) Java Version: 19 Building folders structure. (0.02s) Compiling code. (5.38s) Compiling layouts code. (0.16s) Organizing libraries. (1.62s) (AndroidX SDK) Compiling resources (4.00s) Linking resources (0.51s) build tools: 34.0.0, android jar: android-34 Compiling debugger engine code. (19.25s) Compiling generated Java code. (21.99s) Finding libraries that need to be dexed. (0.03s) Dex code (70.54s) Dex merge (19.20s) Copying libraries resources (3.55s) ZipAlign file. (0.18s) Signing package file (private key). (0.90s) Installing file to device. (0.13s) Installing with B4A-Bridge. Completed successfully.
B4A Version: 13.00 Parsing code. (4.28s) Java Version: 19 Building folders structure. (0.02s) Compiling code. (5.38s) Compiling layouts code. (0.16s) Organizing libraries. (1.62s) (AndroidX SDK) Compiling resources (4.00s) Linking resources (0.51s) build tools: 34.0.0, android jar: android-34 Compiling debugger engine code. (19.25s) Compiling generated Java code. (21.99s) Finding libraries that need to be dexed. (0.03s) Dex code (70.54s) Dex merge (19.20s) Copying libraries resources (3.55s) ZipAlign file. (0.18s) Signing package file (private key). (0.90s) Installing file to device. (0.13s) Installing with B4A-Bridge. Completed successfully.
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2025 #6 This is indeed very slow. What are the computer specs?
B bridge1 Member Feb 19, 2025 #7 Build hardware specifications: cpu AMD @2.00 GHz (6 core - 12 threads) ram 16gb ssd 1tb
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2025 #8 Maybe the CPU is a bit slow. Maybe the problem is somewhere else. I assume that you aren't using a VM or a network drive.
Maybe the CPU is a bit slow. Maybe the problem is somewhere else. I assume that you aren't using a VM or a network drive.
B bridge1 Member Feb 20, 2025 #9 For B4a 13.00 development do you know what the minimum hardware specifications are?