The time is taken even when running the "tasks" task.
On Jun 23, 2011 8:06 AM, "Robert Fischer" <[email protected]>
wrote:
> Wouldn't that closure have to be resolved in order to do UP-TO-DATE
> checking on that task? So it's before the execution of the task, at
> least. It will be as soon as someone paid any attention to the input
> to the "jar" task.
>
> ~~ Robert.
>
>
>
> On Wed, Jun 22, 2011 at 4:51 PM, Szczepan Faber <[email protected]>
wrote:
>> The closure passed to from() method for sure is evaluated at execution
>> of the task. So it may be that it was eating up the time but surely
>> not the configuration phase time?
>>
>> Cheers!
>>
>> On Wed, Jun 22, 2011 at 6:39 PM, M A <[email protected]>
wrote:
>>> Hi Adam,
>>>
>>> Confirmed. It's this fragment that's eating all the time:
>>>
>>> jar {
>>> from {
>>> dependencies.collect {
>>> it.isDirectory() ? it : zipTree(it)
>>> }
>>> }
>>> }
>>>
>>> I was hoping that making the expression passed to jar.from a closure
>>> would make it lazily evaluated. I don't think this configuration can
>>> be moved to a doFirst. Perhaps I can move this to a task class and
>>> keep my implicit input/output declarations? What would you do to
>>> resolve this?
>>>
>>> Cheers,
>>> Merlyn
>>>
>>> On Tue, Jun 21, 201 at 4:55 PM, Adam Murdoch
>>> <[email protected]> wrote:
>>>>
>>>> On 22/06/2011, at 8:58 AM, 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?
>>>>
>>>> A common problem is accidentally resolving dependencies at
configuration
>>>> time, rather than at execution time. This can make the configuration
phase
>>>> quite slow, particularly if those dependencies include dynamic
revisions or
>>>> snapshots.
>>>> The profiling report does not yet give you any information about how
long
>>>> dependency resolution takes, or where in the build it happens. We do
want to
>>>> add this at some point.
>>>> What you could do in the meantime is comment out all the dependencies
>>>> (temporarily, of course), and see if this has an effect on the
execution
>>>> time for, say, 'gradle help'.
>>>>
>>>>
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Adam Murdoch
>>>> Gradle Co-founder
>>>> http://www.gradle.org
>>>> VP of Engineering, Gradleware Inc. - Gradle Training,
Support, Consulting
>>>> http://www.gradleware.com
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>> http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>
>>
>>
>> --
>> Szczepan Faber
>> Principal engineer@gradleware
>> Lead@mockito
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>> http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>