Every time I make a minor change to my Grails app it takes 10-15 seconds to deploy it. The majority of the time is in 'Resolving Dependencies'...
Welcome to Grails 1.3.7 - http://grails.org/
...
Resolving dependencies...
Dependencies resolved in 9868ms.
Here are some details of my setup:
- MacBook (OS X 10.5.8) 2.4Ghz Core 2 Duo with 4GB RAM + plenty of disk space
- SpringSource Tool Suite - Version: 2.6.1.RELEASE Build Id: 201105041000
- Grails 1.3.7
- A small Grails project with only a few domain models
- Just a few plugins: hibernate 1.3.7, mail 1.0, spring-security-core 1.1.3, spring-security-open id 1.0.2, spring-security-ui 0.1.2, webtest 3.0.1
Areas Investigated Already:
- Deleting the .ivy2 directory and forcing a complete external refresh did bring it down by around 5 seconds.
- My .ivy2 directory is on my local machine so it's not this problem
- I did have some dependency problems similar to these however I've now fixed them and I'm not getting any errors.
- I've turned the logging on in BuildConfig.groovy by setting log "info" in the grails.project.dependency.resolution section. It appears to be spending most of the time 'resolving' the dependencies rather than actually downloading items, so I don't think mavenCentral or other public Maven repositories are a problem.
Extract from log...
resolution report resolve 802ms artifacts dl 86ms
resolution report resolve 8492ms artifacts dl 150ms
Dependencies resolved in 9909ms.
Extra Info: By deploy I mean using 'run-app', by redeploy I mean changing a file that forces Grails to automaticaly do a 'run-app.' I don't have any other network related performance issues and have a 32MB down, 1MB up broadband internet connection.
For benchmarking I have worked on a similarly sized app in the past where the 'Resolving Dependencies' took around 1 second. That setup was Grails 1.3.6, Shiro security plugin, a similarly small project with a few domain models on a Windows XP service Pack 3 machine (Intel Core 2 Duo 2.2Ghz, 2GB RAM) Then I was using NetBeans 6.9.1.
Extra Info 2: The full ivy log is attached here
I'm changing very few files each time so it is extremely frustrating when it takes 15 seconds to do a redeploy.
Does anyone have any tips on how to reduce the time needed for 'Resolving Dependencies...'?