Something that I found loosing a lot of time on was my GRADLE_USER_HOME folder.

By default it points into User Home location. Problem I had was that my User 
Home was a mapped network drive. Every time it was running build, dependencies 
were resolved from that drive. It was rather slow for me. Changing the 
GRADLE_USER_HOME to be locally on my Hard Drive solved the timing for me.

I know that this is not your particular issue Merlyn but it might be useful for 
someone :)

Greg

On 21 Jun 2011, at 23:58, M A wrote:

> Hi all,
> 
> My gradle build is eating almost 30 seconds even before it considers
> executing any tasks. How do I best go about diagnosing the problem?
> 
> Cheers,
> Merlyn
> 
> =========== details ============
> 
> When I run this command:
> 
> gradle --profile tasks
> 
> Here's the output:
> 
> Summary
> Total Build Time      33.494
> Startup       1.268
> Settings and BuildSrc         0.617
> Loading Projects      0.539
> Configuring Projects  28.697
> Total Task Execution  1.649
> 
> When I run in debug mode
> 
> gradle -d tasks
> 
> Then I get 33890 lines of output, of which 33456 are IvyLoggingAdapter.
> 
> I noticed the log messages of the form "took XX secs". 223 lines
> mention "secs". These are the ones that are 0.1 seconds or greater:
> 
> 15:41:34.253 [DEBUG]
> [org.gradle.initialization.ScriptEvaluatingSettingsProcessor] Timing:
> Processing settings took: 0.665 secs
> 15:41:34.761 [DEBUG] [org.gradle.initialization.BuildLoader] Timing:
> Loading projects took: 0.506 secs
> 15:41:40.091 [DEBUG] [org.gradle.configuration.BuildScriptProcessor]
> Timing: Running the build script took 5.323 secs
> 15:41:40.860 [DEBUG] [org.gradle.configuration.BuildScriptProcessor]
> Timing: Running the build script took 0.125 secs
> 15:41:41.031 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultSettingsConverter]
> Timing: Ivy convert for resolve took 0.136 secs
> 15:41:42.976 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.moduleconverter.ResolveModuleDescriptorConverter]
> Timing: Ivy convert for resolve took 1.328 secs
> 15:41:42.985 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.moduleconverter.PublishModuleDescriptorConverter]
> Timing: Ivy convert for publish took 1.337 secs
> 15:41:45.892 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.moduleconverter.ResolveModuleDescriptorConverter]
> Timing: Ivy convert for resolve took 1.046 secs
> 15:41:45.896 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.moduleconverter.PublishModuleDescriptorConverter]
> Timing: Ivy convert for publish took 1.05 secs
> 15:41:47.291 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 4.305 secs
> 15:41:47.406 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyReportConverter]
> Timing: Translating report for configuration configuration
> ':PATH:SOMEPROJECT' took 0.103 secs
> 15:41:49.120 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.849 secs
> 15:41:50.230 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.42 secs
> 15:41:51.287 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.401 secs
> 15:41:52.599 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.491 secs
> 15:41:53.646 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.391 secs
> 15:41:54.909 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.465 secs
> 15:41:56.088 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.509 secs
> 15:41:57.078 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.334 secs
> 15:41:57.384 [DEBUG] [org.gradle.configuration.BuildScriptProcessor]
> Timing: Running the build script took 0.134 secs
> 15:41:58.419 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.602 secs
> 15:41:59.438 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.259 secs
> 15:42:00.682 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 0.649 secs
> 15:42:02.780 [DEBUG]
> [org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyResolver]
> Timing: Ivy resolve took 1.092 secs
> 15:42:03.777 [DEBUG] [org.gradle.configuration.BuildScriptProcessor]
> Timing: Running the build script took 0.764 secs
> 15:42:03.954 [DEBUG] [org.gradle.configuration.BuildScriptProcessor]
> Timing: Running the build script took 0.168 secs
> 15:42:05.832 [DEBUG] [org.gradle.execution.DefaultTaskGraphExecuter]
> Timing: Executing the DAG took 1.188 secs
> 15:42:05.834 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 33.536 
> secs
> 
> I'm using Gradle 1.0-milestone-3.
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 

--
Grzegorz Gigon
http://greggigon.com
http://www.linkedin.com/in/greggigon 
Twitter: gregorygigon

"You see, wire telegraph is a kind of a very, very long cat. You pull his tail 
in New York and his head is meowing in Los Angeles. Do you understand this? And 
radio operates exactly the same way: you send signals here, they receive them 
there. The only difference is that there is no cat."
     Albert Einstein, when asked to describe radio

Reply via email to