STS Performance with Grails/Groovy

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

STS Performance with Grails/Groovy

dalew75
I'm really having a hard time with performance with STS on Grails projects (using Grails&Groovy extensions).  The IDE has periods where it "thinks" much too long and things seize up. I know there's a lot going on under the hood, but probably still not as much as a Java project.  Are there any particular settings I can disable (doc lookup, method completion etc) that will give me a good performance boost?  Is there a way to disable content assist perhaps (doesn't offer much for Grails now anyways)

I've already messed around with various settings in the shortcut to allocate memory and permgen space
Dale Wiggins
Architect/Developer
StudentUniverse
Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

Arash Sharif
Did you do the usual things inside the STS.ini file to increase heap?

On Fri, Mar 18, 2011 at 12:18 PM, dalew75 <[hidden email]> wrote:
I'm really having a hard time with performance with STS on Grails projects
(using Grails&Groovy extensions).  The IDE has periods where it "thinks"
much too long and things seize up. I know there's a lot going on under the
hood, but probably still not as much as a Java project.  Are there any
particular settings I can disable (doc lookup, method completion etc) that
will give me a good performance boost?  Is there a way to disable content
assist perhaps (doesn't offer much for Grails now anyways)

I've already messed around with various settings in the shortcut to allocate
memory and permgen space

--
View this message in context: http://grails.1312388.n4.nabble.com/STS-Performance-with-Grails-Groovy-tp3388162p3388162.html
Sent from the Grails - user mailing list archive at Nabble.com.

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

dalew75
Yeah, but I do in in the shortcut settings to launch STS (in Windows) In the target field I'll have this (and I've tried different values)

C:\springsource\sts-2.5.2.RELEASE\STS.exe -vmargs -Xms1024m -Xmx1024m -XX:PermSize=512m  -XX:MaxPermSize=512m
Dale Wiggins
Architect/Developer
StudentUniverse
Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

Andy Clement
I see you are on STS 2.5.2 - it would be at least upgrading to
Groovy-Eclipse 2.1.2 on that version of STS, or upgrading entirely to
STS 2.6.0 that we put out this morning.  The latest groovy-eclipse can
be obtained from this update site:

http://dist.springsource.org/release/GRECLIPSE/e3.6/

Lately the groovy/grails tools have both had some enhancements in to
speed things up here and there, and there is more to come.  Are the
random pauses not apparently connected to what you are doing at the
time?  We expect slight pauses (that we are trying to reduce) when you
press Ctrl+Space to initiate code assist, for example.  You can open
the groovy console view to see if long periods of time are seemingly
wasted during unhelpful stuff - in the console view click the pull
down and choose Groovy Event Console.

To see if it might be memory related you could turn on the heap info
widget in STS, open the preferences page, then General, then 'Show
Heap Status' which will reflect heap usage in the bottom right of
eclipse.  Is that tending to hover around whatever your Xmx is set to?

You could try turning off reconciling to see if that makes any
difference.  Reconciling is the mini-compiles that run whenever you
stop typing, to ensure you are getting up to date editor feedback.
Turn those off in : Preferences>Java>Editor - unset 'report problems
as you type'.

Configure the content assist providers in
Java>Editor>ContentAssist>Advanced - you can uncheck the groovy ones
there.

Might be worth raising a bug at
https://issuetracker.springsource.com/browse/STS so we can get to the
bottom of things.

cheers
Andy
---
Andy Clement
SpringSource Tool Suite Team


On 18 March 2011 12:58, dalew75 <[hidden email]> wrote:

> Yeah, but I do in in the shortcut settings to launch STS (in Windows) In the
> target field I'll have this (and I've tried different values)
>
> C:\springsource\sts-2.5.2.RELEASE\STS.exe -vmargs -Xms1024m -Xmx1024m
> -XX:PermSize=512m  -XX:MaxPermSize=512m
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/STS-Performance-with-Grails-Groovy-tp3388162p3388263.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: STS Performance with Grails/Groovy

sjoyner
In reply to this post by dalew75
There was a significant change between the performance of 2.5.2 and 2.6. My project is fairly large and would not run at all in 2.5.2. I started using the 2.6.M1 and the problems went away. I'm now on the 2.6 release and things seem to be working very well.
Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

Andrew Eisenberg
Hi,

We are finding that as Grails and its tool support become more mature
and more widely adopted, people are creating larger projects and
pushing the limits of what we originally envisioned.

As Andy has mentioned, there are numerous performance enhancements in
2.6.0, but there is still much more that we can do.  If you continue
to see performance issues, then please let us know.  Try to keep track
of the files/projects you were editing when you experienced the
problems.  Also, look in the error log to see if there are any
relevant problems.

Compared to vanilla Java, there is much more going on under the hood
in a Grails project.  In addition to all analysis that the Eclipse JDT
compiler and project model does, the Groovy editor performs type
inferencing while editing.  To make things even more complicated, the
inferred type of each expression is dependent not only on the
surrounding statements, but also on project structure, plugins, and
Grails version.  All this must be calculated and continually updated
as the project structure changes.

On Fri, Mar 18, 2011 at 1:05 PM, sjoyner <[hidden email]> wrote:

> There was a significant change between the performance of 2.5.2 and 2.6. My
> project is fairly large and would not run at all in 2.5.2. I started using
> the 2.6.M1 and the problems went away. I'm now on the 2.6 release and things
> seem to be working very well.
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/STS-Performance-with-Grails-Groovy-tp3388162p3388287.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: STS Performance with Grails/Groovy

dalew75
Thanks all.  I've upgraded to 2.6.0, and I'll let you know how that goes performance-wise.   I was looking in the New & Noteworthy PDF doc about this release, and saw the section about "Code completion for autowired service fields", and was extremely excited to hear that!  I can't get it to work, however.  

When I enter in something like "myprojectService.", and wait, the method selections that come up are still just the native Groovy/Java methods, and I don't see my methods defined in that service class.  

I've checked the Content assist settings, etc (only see for Java, nothing for Groovy or Grails), and cannot see if I'm missing something.  Any idea on what to do?

Thanks again,
Dale
Dale Wiggins
Architect/Developer
StudentUniverse
Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

burtbeckwith
I saw the same thing - no autocomplete, even of default methods. But I did a project rebuild (Project|Clean) and it worked. Very cool feature.

Burt

> Thanks all.  I've upgraded to 2.6.0, and I'll let you know how that goes
> performance-wise.   I was looking in the New & Noteworthy PDF doc about this
> release, and saw the section about "Code completion for autowired service
> fields", and was extremely excited to hear that!  I can't get it to work,
> however.  
>
> When I enter in something like "myprojectService.", and wait, the method
> selections that come up are still just the native Groovy/Java methods, and I
> don't see my methods defined in that service class.  
>
> I've checked the Content assist settings, etc (only see for Java, nothing
> for Groovy or Grails), and cannot see if I'm missing something.  Any idea on
> what to do?
>
> Thanks again,
> Dale
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/STS-Performance-with-Grails-Groovy-tp3388162p3389747.html
> Sent from the Grails - user mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

dalew75
I always got the default methods, but not my service methods.  If I cycle through the different types by pressing CTRL-space, still no luck.  Also I just tried a clean.

I just created a brand new project in STS on Grails 1.3.7, created a simple controller and service, injected service into controller, and then tried doing "testService." in the index action, and I'm still only getting the default methods.  

Not sure what settings are different for us?  If I go to Prefs, and type "completion" in filters I get content assist settings for Java, Javascript, Web, XML... Nothing in there I can see to fix this though.
Dale Wiggins
Architect/Developer
StudentUniverse
Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

dalew75
Ok, now in the new project, I'm seeing my methods after refreshing dependencies (Alt-G, R).  That seems to work great.  

Still no luck in my large project doing the same thing though.  Getting there.  Great to see progress on STS Grails support though.  The tag support is fantastic, although a bit inconsistent across different tags sometimes.
Dale Wiggins
Architect/Developer
StudentUniverse
Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

dalew75
In reply to this post by burtbeckwith
Sorry for all the posts, but just wanted to update that the large project now seems to be working with the injected service code completion (method lookup).  I don't know what finally got it going, maybe refreshing dependencies, combined with closing and reopening the project, I'm not sure exactly....  

If I figure out a more definite way of ensuring success, I'll post later.  In the meantime, it appears you do always need to refresh dependencies manually whenever you add/change methods in a service, and want to see them in autocomplete.

Thanks again,
Dale
Dale Wiggins
Architect/Developer
StudentUniverse
Reply | Threaded
Open this post in threaded view
|

Re: STS Performance with Grails/Groovy

Andrew Eisenberg
Hi Dale,

Thanks for posting on your experience.  I think there is a bug with
the services support.  I'll take a look at it on Monday.  The bug
report is here:
http://issuetracker.springsource.com/browse/STS-1675



On Sat, Mar 19, 2011 at 9:08 AM, dalew75 <[hidden email]> wrote:

> Sorry for all the posts, but just wanted to update that the large project now
> seems to be working with the injected service code completion (method
> lookup).  I don't know what finally got it going, maybe refreshing
> dependencies, combined with closing and reopening the project, I'm not sure
> exactly....
>
> If I figure out a more definite way of ensuring success, I'll post later.
> In the meantime, it appears you do always need to refresh dependencies
> manually whenever you add/change methods in a service, and want to see them
> in autocomplete.
>
> Thanks again,
> Dale
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/STS-Performance-with-Grails-Groovy-tp3388162p3389915.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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