-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Build performance improvements #3926
Conversation
Signed-off-by: Inaki Villar <inaki.seri@gmail.com>
Signed-off-by: Inaki Villar <inaki.seri@gmail.com>
Signed-off-by: Inaki Villar <inaki.seri@gmail.com>
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #3926 +/- ##
============================================
+ Coverage 70.46% 70.62% +0.15%
- Complexity 56600 56684 +84
============================================
Files 4557 4563 +6
Lines 272737 272755 +18
Branches 40040 40040
============================================
+ Hits 192188 192625 +437
+ Misses 64324 63869 -455
- Partials 16225 16261 +36
Continue to review full report at Codecov.
|
@@ -392,7 +392,7 @@ tasks.register('buildRpm', Rpm) { | |||
} | |||
|
|||
tasks.register('buildNoJdkRpm', Rpm) { | |||
configure(commonRpmConfig(true, 'x64')) | |||
configure(commonRpmConfig(false, 'x64')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -183,6 +183,7 @@ configure(project(":server")) { | |||
} | |||
} | |||
|
|||
@CacheableTask |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Cool, all makes sense. Any idea on what kind of practical performance improvement we're seeing with these and in what scenario? |
* set appropiate jdk boolean for buildNoJdkRpm Signed-off-by: Inaki Villar <inaki.seri@gmail.com> * make missingJavadoc cacheable Signed-off-by: Inaki Villar <inaki.seri@gmail.com> * using relativepath for javadoc.options.linksOffline Signed-off-by: Inaki Villar <inaki.seri@gmail.com> (cherry picked from commit cc10b97)
hi @dblock, the immediate performance improvement happens on the compile avoidance scenario. When we are executing incremental builds the tasks |
* set appropiate jdk boolean for buildNoJdkRpm Signed-off-by: Inaki Villar <inaki.seri@gmail.com> * make missingJavadoc cacheable Signed-off-by: Inaki Villar <inaki.seri@gmail.com> * using relativepath for javadoc.options.linksOffline Signed-off-by: Inaki Villar <inaki.seri@gmail.com> (cherry picked from commit cc10b97) Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com>
* set appropiate jdk boolean for buildNoJdkRpm Signed-off-by: Inaki Villar <inaki.seri@gmail.com> * make missingJavadoc cacheable Signed-off-by: Inaki Villar <inaki.seri@gmail.com> * using relativepath for javadoc.options.linksOffline Signed-off-by: Inaki Villar <inaki.seri@gmail.com> (cherry picked from commit cc10b97) Signed-off-by: Daniel (dB.) Doubrovkine <dblock@amazon.com> Co-authored-by: Iñaki Villar <inaki.seri@gmail.com>
Description
This Pull Request proposes small improvements to the build script logic to improve performance and cache hit ratio in the project.
Issues Resolved
buildNoJdkRpm
andbuildRpm
[BUG] Incorrect configuration task buildNoJdkRpm #3927missingJavadoc
task cacheablejavadoc
outputs are reusable between different environmentsBuild improvements
Compilation avoidance
The configuration of the task
buildNoJdkRpm
is:The current configuration was setting the incorrect parameter
jdk
to true. This configuration was causing in incremental build scenarios the execution of the tasks. After setting the correct parameter tasks are UP-TO-DATE.Results:
Main branch: https://scans.gradle.com/s/2wvwfoybovs3e
This PR: https://scans.gradle.com/s/jdjx4vxwgqy4w
MissingJavadoc cacheable
Caching was not enabled for the task. We are updating the task definition with:
Additionally, we are avoiding the potential overlapping outputs issue setting the output of the task in a different folder.
Results:
Main branch: https://scans.gradle.com/s/lpchzshhoe5iy/performance/build-cache
This PR: https://scans.gradle.com/s/x65oz7h3l7xks/performance/build-cache
Javadoc output reusable in different environments
When we are building from different environments(CI, different local paths), javadoc tasks were not cacheable. This was caused by the usage of the absolute path in the property
javadoc.options.linksOffline
:This PR updates the configuration to use a relative path in the property.
Results:
Main: https://scans.gradle.com/s/mpbt2xbmg3ety/performance/build-cache
This PR: https://scans.gradle.com/s/vkxooiwndw3sq/performance/build-cache
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.