Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grails3.3.9 upgrade to Grails4.0.1 Stuck in :compileGroovy step #11460

Closed
4 tasks
zhangjiayu139 opened this issue Jan 13, 2020 · 10 comments
Closed
4 tasks

Grails3.3.9 upgrade to Grails4.0.1 Stuck in :compileGroovy step #11460

zhangjiayu139 opened this issue Jan 13, 2020 · 10 comments

Comments

@zhangjiayu139
Copy link

Grails3.3.9 upgrade to Grails4.0.1 Stuck in :compileGroovy step,look image

NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/grails) or Slack (http://slack-signup.grails.org). DO NOT use
grails4 0 1
the issue tracker to ask questions.

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem uploaded to Github
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. TODO
  2. TODO
  3. TODO

Expected Behaviour

Tell us what should happen

Actual Behaviour

Tell us what happens instead

Environment Information

  • Operating System: TODO
  • Grails Version: TODO
  • JDK Version: TODO
  • Container Version (If Applicable): TODO

Example Application

  • TODO: link to github repository with example that reproduces the issue
@graemerocher
Copy link
Member

Please provide an example that reproduces the issue

@zhangjiayu139
Copy link
Author

@zhangjiayu139
Copy link
Author

rum grails compile command

@puneetbehl
Copy link
Contributor

@zhangjiayu139 The link mentioned above is broken.

@zhangjiayu139
Copy link
Author

sorry,i am remove, this link : https://github.com/zhangjiayu139/demo.git

@puneetbehl
Copy link
Contributor

puneetbehl commented Jan 15, 2020

@zhangjiayu139 Just curious, how much memory was required to run the application in the previous version.

@zhangjiayu139
Copy link
Author

@puneetbehl This project grails3.3.9 runs about 1G of memory, but as the running time goes on, the memory will continue to increase. In addition, the grails3.3.9 version, it takes a long time to start each time, about 3 minutes to start, so the development efficiency is very low.

However, my other project upgraded grails4.0.1 successfully, reducing the running time by half, so I also wanted to upgrade this project to improve the development efficiency, but it backfired

@puneetbehl
Copy link
Contributor

puneetbehl commented Jan 16, 2020

@zhangjiayu139 It looks like the jvmArgs for compileGroovy task is 512M. Although, I configure the org.gradle.jvmargs in gradle.properties but somehow it's still 512M.

However, I am able to get the execution time of grails compile command to 55s after the following changes:

  1. Set the following properties in gradle.properties

.gradle.properties

org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx1024M
  1. In build.gradle file set the forkOptions for compileGroovy task as:

.build.gradle

compileGroovy.groovyOptions.forkOptions.jvmArgs = ['-Xmx1024m']

@zhangjiayu139
Copy link
Author

I'm sorry, my mistake

@zhangjiayu139
Copy link
Author

@puneetbehl Thanks very much for your help. Upgrade to grails4.0.1 starts up fast. After successful compilation of compileGroovy, it starts up in 40 seconds, which is many times faster than grails3.3.9

puneetbehl added a commit to grails-profiles/base that referenced this issue Feb 14, 2020
puneetbehl added a commit to grails-profiles/base that referenced this issue Feb 17, 2020
sdelamo added a commit to grails-samples/geb-example-grails that referenced this issue Dec 1, 2020
grails/grails-core#11460 Update default Groovy fork options for better performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants