Are you using the daemon? If not, you should.
Are you using the default memory setup for Gradle? if not try to give it a
bit more to see if it helps. If it doesn't you can try to give dx more
instead especially since your app is big. See here:
http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-dex-options

How long was your Ant build? (did you hack mutli-dex in Ant?) the dx step
in Ant should be taking the same amount of time since it's unrelated to the
build system that calls it. (unless you take into account pre-dexing but
Ant didn't support it, and Gradle w/ multi-dex has to disable it)

You can run with --profile to see what really takes time. If you want you
can send it to me to see.

On Sun, Jun 28, 2015 at 3:15 AM, 杨辉 <[email protected]> wrote:

> Why Gradle is so slow?  +Xavier Ducrohet
> <https://plus.google.com/109385828142935151413>
>
>
> Gradle version  (File -> Project Structure, Project):  Gradle 2.4
> Android Plugin Version  (File -> Project Structure, Project):
>        classpath 'com.android.tools.build:gradle:1.1.1'
>
> SDK Version: “Android SDK Tools” Rev. (Tools -> Android -> SDK Manager) :
> 21
> Module Compile Sdk Version  (File -> Project Structure, Your Module): 21
> Module Build Tools Version  (File -> Project Structure, Your Module):
> 21.1.2
>
>
> I am trying to mirrate a project from (eclipse + Ant) to (Android Stdido +
> Gradle),everything goes well,but copimling is so slow!!!
>
> The project has Over 65K Methods,so i have add Multidex.The structure is
> as follows:
> app,module A,module B,module C,module D,module E,module F.
>
> My laptop is hp ProBook 430.
> Disk:  Samsung SSD 840 Pro   256G
> Memory: 12.0 GB
>
> I execute the command:
> ./gradlew assembleDevelopDebug --info
>
> for completely compiling:
> :***_module_main:dexDevelopDebug (Thread[Task worker Thread 3,5,main])
> completed. Took 1 mins 47.907 secs.
> Total time: 4 mins 16.198 secs
>
> for incremental  compiling: (i just delete one line code)
> :***_module_main:dexDevelopDebug (Thread[Daemon worker Thread 4,5,main])
> completed. Took 1 mins 36.453 secs.
> Total time: 3 mins 0.863 secs
>
> My problem is :
>
> Why Gradle is so slow? Whether or not incremental  compiling.
> Especially execute the task dex...
>
>
> https://code.google.com/p/android/issues/detail?id=178345&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
> 
>
> --
> 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