Android Question B4A 13.0 very slow debuging

uniplan

Active Member
Licensed User
Longtime User
As requested, I create a new thread for the problem I had following the installation of the new version of B4A 13.0.
I installed version 13.0 but I noticed a significant slowdown.
During debugging, it takes several minutes to compile my application and this is not acceptable.
Can I do something to optimize and speed up the times? Otherwise, how can I go back to version 12.8?

These are the compilation times I had:

B4X:
B4A Versione: 13.00
Analisi del Codice.    (2.30s)
    Java Versione: 19
Building folders structure.    (0.14s)
Compilazione del codice.    (5.37s)
Compilazione del codice di layouts    (0.73s)
Organizzazione Librerie.    (0.28s)
    (AndroidX SDK)
Compilazione risorse    (10.75s)
Collegamento risorse    (5.50s)
    build tools: 34.0.0, android jar: android-34
Compilazione del codice debugger.    (32.09s)
Compilazione del codice Java prodotto.    (60.03s)
Ricerca librerie che necessitano di essere "dexed".    (0.16s)
Dex code    (79.69s)
Dex merge    (42.14s)
Copia risorse delle librerie    (15.71s)
ZipAlign file.    (0.38s)
Firmo il package file ( chiave di debug ).    (2.70s)
Installazione file sul dispositivo.    (10.20s)
 
Solution
It isn't really related to B4A v12.8 vs. B4A v13.0. The performance of both versions is identical. The difference is in the newer Android SDK which is larger. You can keep using the old Android SDK.

I recommend checking the value of MaxRamForDex in the ini file. Make sure that it is least 2048.

Peter Simpson

Expert
Licensed User
Longtime User
As requested, I create a new thread for the problem I had following the installation of the new version of B4A 13.0.
I installed version 13.0 but I noticed a significant slowdown.
During debugging, it takes several minutes to compile my application and this is not acceptable.
How big is your project, who many libraries etc?

This is the compile times from one of my larger B4A projects. This project uses a number of B4XPages and a lot of libraries, it compiles relativly quickly with no issues whatsoever. I have noticed that the apk file size is larger in size now, but that doesn't really bother me.

B4A compile Window:
B4A Version: 13.00
Parsing code.    (0.14s)
    Java Version: 19
Building folders structure.    (0.55s)
Running custom action.    (0.30s)
Compiling code.    (0.17s)
    
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.03s)
Organizing libraries.    (0.10s)
    (AndroidX SDK)
Compiling resources    (2.10s)
Linking resources    (0.44s)
    build tools: 34.0.0, android jar: android-34
Compiling generated Java code.    (5.04s)
Finding libraries that need to be dexed.    (0.05s)
Dex code    (5.65s)
Dex merge    (5.65s)
Copying libraries resources    (2.13s)
ZipAlign file.    (0.05s)
Signing package file (private key).    (0.76s)

Probably makes no different, but have you tried cleaning the project, could it be the specs of your machine or a slow drive???
 
Upvote 0

uniplan

Active Member
Licensed User
Longtime User
How big is your project, who many libraries etc?

This is the compile times from one of my larger B4A projects. This project uses a number of B4XPages and a lot of libraries, it compiles relativly quickly with no issues whatsoever. I have noticed that the apk file size is larger in size now, but that doesn't really bother me.

B4A compile Window:
B4A Version: 13.00
Parsing code.    (0.14s)
    Java Version: 19
Building folders structure.    (0.55s)
Running custom action.    (0.30s)
Compiling code.    (0.17s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.03s)
Organizing libraries.    (0.10s)
    (AndroidX SDK)
Compiling resources    (2.10s)
Linking resources    (0.44s)
    build tools: 34.0.0, android jar: android-34
Compiling generated Java code.    (5.04s)
Finding libraries that need to be dexed.    (0.05s)
Dex code    (5.65s)
Dex merge    (5.65s)
Copying libraries resources    (2.13s)
ZipAlign file.    (0.05s)
Signing package file (private key).    (0.76s)

Probably makes no different, but have you tried cleaning the project, could it be the specs of your machine or a slow drive???
There are 32 libraries and 54 pages. The compilation times are however much longer than yours in all phases as you can see from the data I previously posted.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It isn't really related to B4A v12.8 vs. B4A v13.0. The performance of both versions is identical. The difference is in the newer Android SDK which is larger. You can keep using the old Android SDK.

I recommend checking the value of MaxRamForDex in the ini file. Make sure that it is least 2048.
 
Upvote 0
Solution
Top