Slow Compile

stefanoa

Active Member
Licensed User
Longtime User
i'm developing an application but when i compile the application, it take long time (about 6 minutes)..
the result compiled apk is about 4,8MB.

there's a method to speed up compilation?
thanks
 

klaus

Expert
Licensed User
Longtime User
That seems estonishing long to me, there must be something special or strange in your program.
You need to give more information.
What part of the compiling process is taking that long ?
When you compile 'normally' (the Run button in the IDE) you will see the different steps of the compiling process with the time needed to do it.

What kind of application is it ?

Best regards.
 
Upvote 0

stefanoa

Active Member
Licensed User
Longtime User
with "normal" run (in Debug mode):

Compiling code 0.98
Generating R file. 0.00
Compiling generated Java Code 5.98
Convert byte code - optimized dex.

>>> process is running longer than expected. Do you want to cancel it?
>> i say NO and then...

Convert byte code - optimized dex. 270.22
standard dexter

Packaging fikes 14.25
Signing package file 8debug key) 4.65
zipaling file 0.22
Installing file to device 0.17
...with bridge...

Completed succesfully
 
Upvote 0

JonPM

Well-Known Member
Licensed User
Longtime User
I notice a significant difference in compile time on my laptop vs my desktop. Is you PC on the slower end?
 
Upvote 0

stefanoa

Active Member
Licensed User
Longtime User
GREAT!!!!!

i've set timeout to 30, clean project and cleaned unused files..

and now:

Compiling code. 0.82
Generating R file. 0.00
Compiling generated Java code. 4.11
Convert byte code - optimized dex. 8.55
Packaging files. 4.49
Signing package file (debug key). 3.67
ZipAlign file. 0.26
Installing file to device. 0.22

compilation total time: 20 seconds!!!!!
thanks very much.... :sign0188: :icon_clap:
 
Last edited:
Upvote 0

alexis

Member
Licensed User
Longtime User
I was having the same problem. Thanks!

Didn't expect that the "cleaned unused files" would make such a big difference.
Erel, Thanks for pointing it out.
:)
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
You can also change to Release mode instead of Debug. It will compile faster.

Overhere that selected drop down list entry is empty, does that mean debug mode by default?

Edit: apparently not, never saw that debug notification before.
 
Last edited:
Upvote 0
Top