[go: nahoru, domu]

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

Improve GRADLE build Performance #7561

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shisheng-1
Copy link

Compiler daemon. The Gradle Java plugin allows you to run the compiler as a separate process by setting options.fork = true. This feature can lead to much less garbage collection and make Gradle’s infrastructure faster. This project has more than 1000 source files. We can consider enabling this feature.

=====================
If there are any inappropriate modifications in this PR, please give me a reply and I will change them.

@lbergelson
Copy link
Member
lbergelson commented Nov 12, 2021

@shisheng-1 Hello, thank you for your contribution!

I tried running with and with-out your change enabled and I didn't see any performance improvement when compiling.

I didn't do a very scientific test, but running the following a few times on master vs your branch didn't show any performance advantage for using fork = true.

./gradlew clean compileTestJava
fork = false true
run 1 77 93
run 2 67 70

From my quick tests it looked like the forking version might actually be a bit slower but I suspect that's just noise.

Do you see different results?

@shisheng-1
Copy link
Author

Hi @lbergelson
I fork this project and use Github Actions to test the build time

  • without fork : 3m 12s
  • with fork but no allprojects: 2m 0s
  • with fork and allprojects:1m 54s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants