Grab is Unusably Slow ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Grab is Unusably Slow ...

simonz
Hi ....

I wanted to play around with the HTTPBuilder and saw that it was set up to be 'grabbable' so I thought, what better time to try out the grab annotation too?

However even the simplest script takes about 30 seconds to run, even when if all the dependencies were downloaded and cached on a previous run!

Is @Grab supposed to be that slow??? Shouldn't it work very fast once the dependencies are cached? Is there anything I can do to speed it up?

Here's my script:

@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.0-SNAPSHOT' )
class Test {
  public static void main(def args) {
    println "Hello world"

    // initialze a new builder and give a default URL
    def http = new groovyx.net.http.HTTPBuilder('http://www.codehaus.org')

  }
}

It takes 30 seconds to run on a quite new fast machine, using groovy 1.6.3 / Java 1.6.0_16.

Cheers,

Simon.
Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Guillaume Laforge-4
On first run, it took more than two minutes, on my machine and
internet connection, to download all the dependencies.
Then subsequent runs took less than 2-3 seconds.
I'm using Groovy 1.7, but I don't think we've changed anything
particular in Grab in 1.7 compared to 1.6.

Where is your user home directory stored? It's not on a remote drive
or anything like that?

On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]> wrote:

> Hi ....
>
> I wanted to play around with the HTTPBuilder and saw that it was set up to
> be 'grabbable' so I thought, what better time to try out the grab annotation
> too?
>
> However even the simplest script takes about 30 seconds to run, even when if
> all the dependencies were downloaded and cached on a previous run!
>
> Is @Grab supposed to be that slow??? Shouldn't it work very fast once the
> dependencies are cached? Is there anything I can do to speed it up?
>
> Here's my script:
>
> @Grab(group='org.codehaus.groovy.modules.http-builder',
> module='http-builder', version='0.5.0-SNAPSHOT' )
> class Test {
>   public static void main(def args) {
>     println "Hello world"
>
>     // initialze a new builder and give a default URL
>     def http = new groovyx.net.http.HTTPBuilder('http://www.codehaus.org')
>
>   }
> }
>
> It takes 30 seconds to run on a quite new fast machine, using groovy 1.6.3 /
> Java 1.6.0_16.
>
> Cheers,
>
> Simon.
> ________________________________
> View this message in context: Grab is Unusably Slow ...
> Sent from the groovy - user mailing list archive at Nabble.com.
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Ronny Løvtangen
First run: 250s
Next runs 15-17s.

Groovy 1.6.4, Java 1.5.0_19


On Oct 12, 2009, at 9:42 AM, Guillaume Laforge wrote:

> On first run, it took more than two minutes, on my machine and
> internet connection, to download all the dependencies.
> Then subsequent runs took less than 2-3 seconds.
> I'm using Groovy 1.7, but I don't think we've changed anything
> particular in Grab in 1.7 compared to 1.6.
>
> Where is your user home directory stored? It's not on a remote drive
> or anything like that?
>
> On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]> wrote:
>> Hi ....
>>
>> I wanted to play around with the HTTPBuilder and saw that it was  
>> set up to
>> be 'grabbable' so I thought, what better time to try out the grab  
>> annotation
>> too?
>>
>> However even the simplest script takes about 30 seconds to run,  
>> even when if
>> all the dependencies were downloaded and cached on a previous run!
>>
>> Is @Grab supposed to be that slow??? Shouldn't it work very fast  
>> once the
>> dependencies are cached? Is there anything I can do to speed it up?
>>
>> Here's my script:
>>
>> @Grab(group='org.codehaus.groovy.modules.http-builder',
>> module='http-builder', version='0.5.0-SNAPSHOT' )
>> class Test {
>>  public static void main(def args) {
>>    println "Hello world"
>>
>>    // initialze a new builder and give a default URL
>>    def http = new groovyx.net.http.HTTPBuilder('http://
>> www.codehaus.org')
>>
>>  }
>> }
>>
>> It takes 30 seconds to run on a quite new fast machine, using  
>> groovy 1.6.3 /
>> Java 1.6.0_16.
>>
>> Cheers,
>>
>> Simon.
>> ________________________________
>> View this message in context: Grab is Unusably Slow ...
>> Sent from the groovy - user mailing list archive at Nabble.com.
>>
>
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> Head of Groovy Development at SpringSource
> http://www.springsource.com/g2one
>
> ---------------------------------------------------------------------
> 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


Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Guillaume Laforge-4
Could one of you try Groovy 1.7, to see if it makes a difference, out
of curiosity?

On Mon, Oct 12, 2009 at 10:45, Ronny Løvtangen <[hidden email]> wrote:

> First run: 250s
> Next runs 15-17s.
>
> Groovy 1.6.4, Java 1.5.0_19
>
>
> On Oct 12, 2009, at 9:42 AM, Guillaume Laforge wrote:
>
>> On first run, it took more than two minutes, on my machine and
>> internet connection, to download all the dependencies.
>> Then subsequent runs took less than 2-3 seconds.
>> I'm using Groovy 1.7, but I don't think we've changed anything
>> particular in Grab in 1.7 compared to 1.6.
>>
>> Where is your user home directory stored? It's not on a remote drive
>> or anything like that?
>>
>> On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]> wrote:
>>>
>>> Hi ....
>>>
>>> I wanted to play around with the HTTPBuilder and saw that it was set up
>>> to
>>> be 'grabbable' so I thought, what better time to try out the grab
>>> annotation
>>> too?
>>>
>>> However even the simplest script takes about 30 seconds to run, even when
>>> if
>>> all the dependencies were downloaded and cached on a previous run!
>>>
>>> Is @Grab supposed to be that slow??? Shouldn't it work very fast once the
>>> dependencies are cached? Is there anything I can do to speed it up?
>>>
>>> Here's my script:
>>>
>>> @Grab(group='org.codehaus.groovy.modules.http-builder',
>>> module='http-builder', version='0.5.0-SNAPSHOT' )
>>> class Test {
>>>  public static void main(def args) {
>>>   println "Hello world"
>>>
>>>   // initialze a new builder and give a default URL
>>>   def http = new groovyx.net.http.HTTPBuilder('http://www.codehaus.org')
>>>
>>>  }
>>> }
>>>
>>> It takes 30 seconds to run on a quite new fast machine, using groovy
>>> 1.6.3 /
>>> Java 1.6.0_16.
>>>
>>> Cheers,
>>>
>>> Simon.
>>> ________________________________
>>> View this message in context: Grab is Unusably Slow ...
>>> Sent from the groovy - user mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Guillaume Laforge
>> Groovy Project Manager
>> Head of Groovy Development at SpringSource
>> http://www.springsource.com/g2one
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Ronny Løvtangen
16-20s with 1.7-beta-1

MacBook Pro 2.4GHz

Ronny

On Oct 12, 2009, at 11:05 AM, Guillaume Laforge wrote:

> Could one of you try Groovy 1.7, to see if it makes a difference, out
> of curiosity?
>
> On Mon, Oct 12, 2009 at 10:45, Ronny Løvtangen <[hidden email]>  
> wrote:
>> First run: 250s
>> Next runs 15-17s.
>>
>> Groovy 1.6.4, Java 1.5.0_19
>>
>>
>> On Oct 12, 2009, at 9:42 AM, Guillaume Laforge wrote:
>>
>>> On first run, it took more than two minutes, on my machine and
>>> internet connection, to download all the dependencies.
>>> Then subsequent runs took less than 2-3 seconds.
>>> I'm using Groovy 1.7, but I don't think we've changed anything
>>> particular in Grab in 1.7 compared to 1.6.
>>>
>>> Where is your user home directory stored? It's not on a remote drive
>>> or anything like that?
>>>
>>> On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]> wrote:
>>>>
>>>> Hi ....
>>>>
>>>> I wanted to play around with the HTTPBuilder and saw that it was  
>>>> set up
>>>> to
>>>> be 'grabbable' so I thought, what better time to try out the grab
>>>> annotation
>>>> too?
>>>>
>>>> However even the simplest script takes about 30 seconds to run,  
>>>> even when
>>>> if
>>>> all the dependencies were downloaded and cached on a previous run!
>>>>
>>>> Is @Grab supposed to be that slow??? Shouldn't it work very fast  
>>>> once the
>>>> dependencies are cached? Is there anything I can do to speed it up?
>>>>
>>>> Here's my script:
>>>>
>>>> @Grab(group='org.codehaus.groovy.modules.http-builder',
>>>> module='http-builder', version='0.5.0-SNAPSHOT' )
>>>> class Test {
>>>>  public static void main(def args) {
>>>>   println "Hello world"
>>>>
>>>>   // initialze a new builder and give a default URL
>>>>   def http = new groovyx.net.http.HTTPBuilder('http://
>>>> www.codehaus.org')
>>>>
>>>>  }
>>>> }
>>>>
>>>> It takes 30 seconds to run on a quite new fast machine, using  
>>>> groovy
>>>> 1.6.3 /
>>>> Java 1.6.0_16.
>>>>
>>>> Cheers,
>>>>
>>>> Simon.
>>>> ________________________________
>>>> View this message in context: Grab is Unusably Slow ...
>>>> Sent from the groovy - user mailing list archive at Nabble.com.
>>>>
>>>
>>>
>>>
>>> --
>>> Guillaume Laforge
>>> Groovy Project Manager
>>> Head of Groovy Development at SpringSource
>>> http://www.springsource.com/g2one
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> Head of Groovy Development at SpringSource
> http://www.springsource.com/g2one
>
> ---------------------------------------------------------------------
> 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


Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Guillaume Laforge-4
Thanks for trying it out.
Interestingly, I've got the same MBP as you, just using the upcoming
1.7-beta-2 we'll release today (with mainly just bug fixes), and it's
way faster.
This is really odd :-(
It'd be interesting to see if you could find a way to profile this
run, to see if we see some obvious hotspot?
I'm not sure what's the best way to proceed there.

On Mon, Oct 12, 2009 at 11:22, Ronny Løvtangen <[hidden email]> wrote:

> 16-20s with 1.7-beta-1
>
> MacBook Pro 2.4GHz
>
> Ronny
>
> On Oct 12, 2009, at 11:05 AM, Guillaume Laforge wrote:
>
>> Could one of you try Groovy 1.7, to see if it makes a difference, out
>> of curiosity?
>>
>> On Mon, Oct 12, 2009 at 10:45, Ronny Løvtangen <[hidden email]>
>> wrote:
>>>
>>> First run: 250s
>>> Next runs 15-17s.
>>>
>>> Groovy 1.6.4, Java 1.5.0_19
>>>
>>>
>>> On Oct 12, 2009, at 9:42 AM, Guillaume Laforge wrote:
>>>
>>>> On first run, it took more than two minutes, on my machine and
>>>> internet connection, to download all the dependencies.
>>>> Then subsequent runs took less than 2-3 seconds.
>>>> I'm using Groovy 1.7, but I don't think we've changed anything
>>>> particular in Grab in 1.7 compared to 1.6.
>>>>
>>>> Where is your user home directory stored? It's not on a remote drive
>>>> or anything like that?
>>>>
>>>> On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]> wrote:
>>>>>
>>>>> Hi ....
>>>>>
>>>>> I wanted to play around with the HTTPBuilder and saw that it was set up
>>>>> to
>>>>> be 'grabbable' so I thought, what better time to try out the grab
>>>>> annotation
>>>>> too?
>>>>>
>>>>> However even the simplest script takes about 30 seconds to run, even
>>>>> when
>>>>> if
>>>>> all the dependencies were downloaded and cached on a previous run!
>>>>>
>>>>> Is @Grab supposed to be that slow??? Shouldn't it work very fast once
>>>>> the
>>>>> dependencies are cached? Is there anything I can do to speed it up?
>>>>>
>>>>> Here's my script:
>>>>>
>>>>> @Grab(group='org.codehaus.groovy.modules.http-builder',
>>>>> module='http-builder', version='0.5.0-SNAPSHOT' )
>>>>> class Test {
>>>>>  public static void main(def args) {
>>>>>  println "Hello world"
>>>>>
>>>>>  // initialze a new builder and give a default URL
>>>>>  def http = new groovyx.net.http.HTTPBuilder('http://www.codehaus.org')
>>>>>
>>>>>  }
>>>>> }
>>>>>
>>>>> It takes 30 seconds to run on a quite new fast machine, using groovy
>>>>> 1.6.3 /
>>>>> Java 1.6.0_16.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Simon.
>>>>> ________________________________
>>>>> View this message in context: Grab is Unusably Slow ...
>>>>> Sent from the groovy - user mailing list archive at Nabble.com.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Guillaume Laforge
>>>> Groovy Project Manager
>>>> Head of Groovy Development at SpringSource
>>>> http://www.springsource.com/g2one
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>
>>
>>
>> --
>> Guillaume Laforge
>> Groovy Project Manager
>> Head of Groovy Development at SpringSource
>> http://www.springsource.com/g2one
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>



--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

simonz
In reply to this post by Guillaume Laforge-4

Guillaume Laforge-2 wrote
On first run, it took more than two minutes, on my machine and
internet connection, to download all the dependencies.
Then subsequent runs took less than 2-3 seconds.
I'm using Groovy 1.7, but I don't think we've changed anything
particular in Grab in 1.7 compared to 1.6.

Where is your user home directory stored? It's not on a remote drive
or anything like that?
No, not remote - it's on the same local hard drive that groovy is running from and on which Windows is installed.

I have got quite a lot of 'grapes' in the home dir now ...  more than 65 subdirectories inside the .groovy/grapes.   Could it be related to how many there are there?  Or - I wonder if I have some kind of bad dependency in there that is making it try to contact a dead server or something even though it's getting (perhaps suboptimal?) dependencies that let it run.

I'll try this with a more up-to-date version of groovy tomorrow if I get a chance.

Thanks!

Simon.
Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Ronny Løvtangen
In reply to this post by Guillaume Laforge-4
If I include the needed jars in my classpath and remove the @Grab, the  
script runs in about 2 seconds.


On Oct 12, 2009, at 11:27 AM, Guillaume Laforge wrote:

> Thanks for trying it out.
> Interestingly, I've got the same MBP as you, just using the upcoming
> 1.7-beta-2 we'll release today (with mainly just bug fixes), and it's
> way faster.
> This is really odd :-(
> It'd be interesting to see if you could find a way to profile this
> run, to see if we see some obvious hotspot?
> I'm not sure what's the best way to proceed there.
>
> On Mon, Oct 12, 2009 at 11:22, Ronny Løvtangen <[hidden email]>  
> wrote:
>> 16-20s with 1.7-beta-1
>>
>> MacBook Pro 2.4GHz
>>
>> Ronny
>>
>> On Oct 12, 2009, at 11:05 AM, Guillaume Laforge wrote:
>>
>>> Could one of you try Groovy 1.7, to see if it makes a difference,  
>>> out
>>> of curiosity?
>>>
>>> On Mon, Oct 12, 2009 at 10:45, Ronny Løvtangen <[hidden email]>
>>> wrote:
>>>>
>>>> First run: 250s
>>>> Next runs 15-17s.
>>>>
>>>> Groovy 1.6.4, Java 1.5.0_19
>>>>
>>>>
>>>> On Oct 12, 2009, at 9:42 AM, Guillaume Laforge wrote:
>>>>
>>>>> On first run, it took more than two minutes, on my machine and
>>>>> internet connection, to download all the dependencies.
>>>>> Then subsequent runs took less than 2-3 seconds.
>>>>> I'm using Groovy 1.7, but I don't think we've changed anything
>>>>> particular in Grab in 1.7 compared to 1.6.
>>>>>
>>>>> Where is your user home directory stored? It's not on a remote  
>>>>> drive
>>>>> or anything like that?
>>>>>
>>>>> On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]>  
>>>>> wrote:
>>>>>>
>>>>>> Hi ....
>>>>>>
>>>>>> I wanted to play around with the HTTPBuilder and saw that it  
>>>>>> was set up
>>>>>> to
>>>>>> be 'grabbable' so I thought, what better time to try out the grab
>>>>>> annotation
>>>>>> too?
>>>>>>
>>>>>> However even the simplest script takes about 30 seconds to run,  
>>>>>> even
>>>>>> when
>>>>>> if
>>>>>> all the dependencies were downloaded and cached on a previous  
>>>>>> run!
>>>>>>
>>>>>> Is @Grab supposed to be that slow??? Shouldn't it work very  
>>>>>> fast once
>>>>>> the
>>>>>> dependencies are cached? Is there anything I can do to speed it  
>>>>>> up?
>>>>>>
>>>>>> Here's my script:
>>>>>>
>>>>>> @Grab(group='org.codehaus.groovy.modules.http-builder',
>>>>>> module='http-builder', version='0.5.0-SNAPSHOT' )
>>>>>> class Test {
>>>>>>  public static void main(def args) {
>>>>>>  println "Hello world"
>>>>>>
>>>>>>  // initialze a new builder and give a default URL
>>>>>>  def http = new groovyx.net.http.HTTPBuilder('http://
>>>>>> www.codehaus.org')
>>>>>>
>>>>>>  }
>>>>>> }
>>>>>>
>>>>>> It takes 30 seconds to run on a quite new fast machine, using  
>>>>>> groovy
>>>>>> 1.6.3 /
>>>>>> Java 1.6.0_16.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Simon.
>>>>>> ________________________________
>>>>>> View this message in context: Grab is Unusably Slow ...
>>>>>> Sent from the groovy - user mailing list archive at Nabble.com.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Guillaume Laforge
>>>>> Groovy Project Manager
>>>>> Head of Groovy Development at SpringSource
>>>>> http://www.springsource.com/g2one
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Guillaume Laforge
>>> Groovy Project Manager
>>> Head of Groovy Development at SpringSource
>>> http://www.springsource.com/g2one
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> Head of Groovy Development at SpringSource
> http://www.springsource.com/g2one
>
> ---------------------------------------------------------------------
> 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


Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Joern Huxhorn
Is it possible that this is caused by SNAPSHOT?
I don't know about Ivy but Maven can be configured to check each and  
every time if a snapshot has changed in the meantime.

Just wondering...

Joern.

On 13.10.2009, at 10:50, Ronny Løvtangen wrote:

> If I include the needed jars in my classpath and remove the @Grab,  
> the script runs in about 2 seconds.
>
>
> On Oct 12, 2009, at 11:27 AM, Guillaume Laforge wrote:
>
>> Thanks for trying it out.
>> Interestingly, I've got the same MBP as you, just using the upcoming
>> 1.7-beta-2 we'll release today (with mainly just bug fixes), and it's
>> way faster.
>> This is really odd :-(
>> It'd be interesting to see if you could find a way to profile this
>> run, to see if we see some obvious hotspot?
>> I'm not sure what's the best way to proceed there.
>>
>> On Mon, Oct 12, 2009 at 11:22, Ronny Løvtangen  
>> <[hidden email]> wrote:
>>> 16-20s with 1.7-beta-1
>>>
>>> MacBook Pro 2.4GHz
>>>
>>> Ronny
>>>
>>> On Oct 12, 2009, at 11:05 AM, Guillaume Laforge wrote:
>>>
>>>> Could one of you try Groovy 1.7, to see if it makes a difference,  
>>>> out
>>>> of curiosity?
>>>>
>>>> On Mon, Oct 12, 2009 at 10:45, Ronny Løvtangen  
>>>> <[hidden email]>
>>>> wrote:
>>>>>
>>>>> First run: 250s
>>>>> Next runs 15-17s.
>>>>>
>>>>> Groovy 1.6.4, Java 1.5.0_19
>>>>>
>>>>>
>>>>> On Oct 12, 2009, at 9:42 AM, Guillaume Laforge wrote:
>>>>>
>>>>>> On first run, it took more than two minutes, on my machine and
>>>>>> internet connection, to download all the dependencies.
>>>>>> Then subsequent runs took less than 2-3 seconds.
>>>>>> I'm using Groovy 1.7, but I don't think we've changed anything
>>>>>> particular in Grab in 1.7 compared to 1.6.
>>>>>>
>>>>>> Where is your user home directory stored? It's not on a remote  
>>>>>> drive
>>>>>> or anything like that?
>>>>>>
>>>>>> On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]>  
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi ....
>>>>>>>
>>>>>>> I wanted to play around with the HTTPBuilder and saw that it  
>>>>>>> was set up
>>>>>>> to
>>>>>>> be 'grabbable' so I thought, what better time to try out the  
>>>>>>> grab
>>>>>>> annotation
>>>>>>> too?
>>>>>>>
>>>>>>> However even the simplest script takes about 30 seconds to  
>>>>>>> run, even
>>>>>>> when
>>>>>>> if
>>>>>>> all the dependencies were downloaded and cached on a previous  
>>>>>>> run!
>>>>>>>
>>>>>>> Is @Grab supposed to be that slow??? Shouldn't it work very  
>>>>>>> fast once
>>>>>>> the
>>>>>>> dependencies are cached? Is there anything I can do to speed  
>>>>>>> it up?
>>>>>>>
>>>>>>> Here's my script:
>>>>>>>
>>>>>>> @Grab(group='org.codehaus.groovy.modules.http-builder',
>>>>>>> module='http-builder', version='0.5.0-SNAPSHOT' )
>>>>>>> class Test {
>>>>>>> public static void main(def args) {
>>>>>>> println "Hello world"
>>>>>>>
>>>>>>> // initialze a new builder and give a default URL
>>>>>>> def http = new groovyx.net.http.HTTPBuilder('http://
>>>>>>> www.codehaus.org')
>>>>>>>
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> It takes 30 seconds to run on a quite new fast machine, using  
>>>>>>> groovy
>>>>>>> 1.6.3 /
>>>>>>> Java 1.6.0_16.
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> Simon.
>>>>>>> ________________________________
>>>>>>> View this message in context: Grab is Unusably Slow ...
>>>>>>> Sent from the groovy - user mailing list archive at Nabble.com.
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Guillaume Laforge
>>>>>> Groovy Project Manager
>>>>>> Head of Groovy Development at SpringSource
>>>>>> http://www.springsource.com/g2one
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Guillaume Laforge
>>>> Groovy Project Manager
>>>> Head of Groovy Development at SpringSource
>>>> http://www.springsource.com/g2one
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>
>>
>>
>> --
>> Guillaume Laforge
>> Groovy Project Manager
>> Head of Groovy Development at SpringSource
>> http://www.springsource.com/g2one
>>
>> ---------------------------------------------------------------------
>> 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
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grab is Unusably Slow ...

Ronny Løvtangen
Could be, but my tests are all run with 0.5.0-RC1 (didn't have the  
repo for 0.5.0-SNAPSHOT configured)

Ronny

On Oct 13, 2009, at 9:10 PM, Joern Huxhorn wrote:

> Is it possible that this is caused by SNAPSHOT?
> I don't know about Ivy but Maven can be configured to check each and  
> every time if a snapshot has changed in the meantime.
>
> Just wondering...
>
> Joern.
>
> On 13.10.2009, at 10:50, Ronny Løvtangen wrote:
>
>> If I include the needed jars in my classpath and remove the @Grab,  
>> the script runs in about 2 seconds.
>>
>>
>> On Oct 12, 2009, at 11:27 AM, Guillaume Laforge wrote:
>>
>>> Thanks for trying it out.
>>> Interestingly, I've got the same MBP as you, just using the upcoming
>>> 1.7-beta-2 we'll release today (with mainly just bug fixes), and  
>>> it's
>>> way faster.
>>> This is really odd :-(
>>> It'd be interesting to see if you could find a way to profile this
>>> run, to see if we see some obvious hotspot?
>>> I'm not sure what's the best way to proceed there.
>>>
>>> On Mon, Oct 12, 2009 at 11:22, Ronny Løvtangen  
>>> <[hidden email]> wrote:
>>>> 16-20s with 1.7-beta-1
>>>>
>>>> MacBook Pro 2.4GHz
>>>>
>>>> Ronny
>>>>
>>>> On Oct 12, 2009, at 11:05 AM, Guillaume Laforge wrote:
>>>>
>>>>> Could one of you try Groovy 1.7, to see if it makes a  
>>>>> difference, out
>>>>> of curiosity?
>>>>>
>>>>> On Mon, Oct 12, 2009 at 10:45, Ronny Løvtangen <[hidden email]
>>>>> >
>>>>> wrote:
>>>>>>
>>>>>> First run: 250s
>>>>>> Next runs 15-17s.
>>>>>>
>>>>>> Groovy 1.6.4, Java 1.5.0_19
>>>>>>
>>>>>>
>>>>>> On Oct 12, 2009, at 9:42 AM, Guillaume Laforge wrote:
>>>>>>
>>>>>>> On first run, it took more than two minutes, on my machine and
>>>>>>> internet connection, to download all the dependencies.
>>>>>>> Then subsequent runs took less than 2-3 seconds.
>>>>>>> I'm using Groovy 1.7, but I don't think we've changed anything
>>>>>>> particular in Grab in 1.7 compared to 1.6.
>>>>>>>
>>>>>>> Where is your user home directory stored? It's not on a remote  
>>>>>>> drive
>>>>>>> or anything like that?
>>>>>>>
>>>>>>> On Mon, Oct 12, 2009 at 08:03, simonz <[hidden email]>  
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Hi ....
>>>>>>>>
>>>>>>>> I wanted to play around with the HTTPBuilder and saw that it  
>>>>>>>> was set up
>>>>>>>> to
>>>>>>>> be 'grabbable' so I thought, what better time to try out the  
>>>>>>>> grab
>>>>>>>> annotation
>>>>>>>> too?
>>>>>>>>
>>>>>>>> However even the simplest script takes about 30 seconds to  
>>>>>>>> run, even
>>>>>>>> when
>>>>>>>> if
>>>>>>>> all the dependencies were downloaded and cached on a previous  
>>>>>>>> run!
>>>>>>>>
>>>>>>>> Is @Grab supposed to be that slow??? Shouldn't it work very  
>>>>>>>> fast once
>>>>>>>> the
>>>>>>>> dependencies are cached? Is there anything I can do to speed  
>>>>>>>> it up?
>>>>>>>>
>>>>>>>> Here's my script:
>>>>>>>>
>>>>>>>> @Grab(group='org.codehaus.groovy.modules.http-builder',
>>>>>>>> module='http-builder', version='0.5.0-SNAPSHOT' )
>>>>>>>> class Test {
>>>>>>>> public static void main(def args) {
>>>>>>>> println "Hello world"
>>>>>>>>
>>>>>>>> // initialze a new builder and give a default URL
>>>>>>>> def http = new groovyx.net.http.HTTPBuilder('http://
>>>>>>>> www.codehaus.org')
>>>>>>>>
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>> It takes 30 seconds to run on a quite new fast machine, using  
>>>>>>>> groovy
>>>>>>>> 1.6.3 /
>>>>>>>> Java 1.6.0_16.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>>
>>>>>>>> Simon.
>>>>>>>> ________________________________
>>>>>>>> View this message in context: Grab is Unusably Slow ...
>>>>>>>> Sent from the groovy - user mailing list archive at Nabble.com.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Guillaume Laforge
>>>>>>> Groovy Project Manager
>>>>>>> Head of Groovy Development at SpringSource
>>>>>>> http://www.springsource.com/g2one
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> 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
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Guillaume Laforge
>>>>> Groovy Project Manager
>>>>> Head of Groovy Development at SpringSource
>>>>> http://www.springsource.com/g2one
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Guillaume Laforge
>>> Groovy Project Manager
>>> Head of Groovy Development at SpringSource
>>> http://www.springsource.com/g2one
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
> ---------------------------------------------------------------------
> 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


123