By default ADT doesn't do dex in the on-save-build action. This is delayed
until you actually try to launch the app (or export it).

We do this because from the IDE, you mostly care about your Java code
compiling.

Studio has a similar option, I think, but obviously if you run from the
command line with "assemble<name> --profile" you will actually build the
whole app.

In term of performance I would expect the following difference:
- ADT will start building faster while Studio will spend some time doing
the configuration phase. This will go away(*)
- ADT will compile the Java code faster (incremental builds).
- Compile-only builds will be slight slower in the aapt phase in Studio
because the single-aapt step in Gradle also compiles the resources in their
binary format.
- However, full builds will be slower in ADT/Ant in the aapt-phase because
they run aapt twice, once for R.java and once for the packaged resources.
If you have a lot of resources this will be even worse as aapt has to
read/parse them twice. Studio using a single aapt step to do both.
- Studio also pre-merges the resources before sending them to aapt. It does
it incrementally too. This reduces the amount of work aapt has to do for
overlays (which it doesn't do incrementally).
- dexing should be the same, as both ADT/Ant and Gradle use pre-dexing, but
Gradle runs pre-dexing in parallel.
- Packaging should be mostly identical.





On Thu, Jul 3, 2014 at 8:02 AM, Gonçalo Silva <[email protected]>
wrote:

> I see the exact same behaviour. For small changes, Eclipse is always 2 or
> 3 times faster.
>
> I cannot share my profile, but here's everything that takes more than 0.5s
> (I'm using the --daemon and --parallel options):
> - Configuration (2.8s, 0.7s of which are from the main project)
> - Dependency resolution (all dependencies, since none individually takes
> more than 0.5s)
> - dexDebug (10.97s)
> - compileDebugJava (4.7s)
> - packageDebug (1.8s)
>
> In total it takes 26.5 seconds. I should note that an equivalent build
> using Eclipse takes roughly 10 seconds.
>
> One thing that puzzles me is dex. Both of them run dex, but under Gradle
> it takes more time than the whole compilation and packaging in Eclipse. How
> is this possible? Another thing about dex is that it seems to use 4 cores
> on my system, while I have 8. Unsure if any benefit would come from using
> all 8.
>
> Best regards,
> Gonçalo Silva.
>
>
> On Thu, Jul 3, 2014 at 3:48 PM, thierryd <[email protected]> wrote:
>
>> Xavier, I would be happy to get you some profiling data. I've looked into
>> Android studio and I cannot find where I can put the "--profile" flag. Any
>> suggestions? Merci! :)
>>
>>
>> On Wednesday, July 2, 2014 1:40:16 PM UTC-4, Xavier Ducrohet wrote:
>>
>>> You can run from the command line with --profile to see what takes time.
>>>
>>> As I mentioned during IO there are some known bottlenecks that we are
>>> working through. I'm interested in seeing the result of your profiling (if
>>> you can't publish it as is, just let me know what kind of tasks takes a lot
>>> of time and what the evaluation time is as well).
>>>
>>>
>>> On Wed, Jul 2, 2014 at 7:38 AM, thierryd <[email protected]> wrote:
>>>
>>>> Hi all,
>>>> I have switched from Eclipse to Android Studio and my build is a lot
>>>> slower. The same code modifications result in a 18 seconds build time in
>>>> Eclipse, but 34 seconds in Android Studio. I'm just curious if this
>>>> behavior is considered "normal". Xavier said last week at I/O that the tool
>>>> team is now focusing on improving performance. So I guess that the tools
>>>> integration is currently not as tight as in Eclipse. Am I right?
>>>>
>>>>
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "adt-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Xavier Ducrohet
>>> Android SDK Tech Lead
>>> Google Inc.
>>> http://developer.android.com | http://tools.android.com
>>>
>>> Please do not send me questions directly. Thanks!
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "adt-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to