Measure and potentially fix build time regression #380
Comments
@aclement I compared both latest |
I think I have found the root cause and a fix, seems to be related to lack of code removal at build time, I will share more details later. |
Based on my tests, it seems leveraging the new |
Ok I get more evidences, previous finding as just due to oracle/graal#3163 so not relevant. I did a diff of the classes shipped in the native-image between 0.8.2 (known to compile fast) and Some could be legit to fix compat, some could be just footprint regression due to hint updates. See attached diff for more details. |
This change includes enhancements to the configuration properties analysis to try and get closer to how 0.8.2 behaved. 0.8.2 didn't do the right thing for all types of configuration property usage so now we are more correct it is not surprising we have to pay a price for that. These changes try to minimize that impact. There are also some hint adjustments that seem reasonable. These changes also connect configuration property reflective access to the build time property checking option. Using that option can create a further saving in memory/image-size.
Some work done. Some of the new types that are appearing in the diff now are due us being better/more-compatible - in particular they relate to the changes in handling for configuration properties (using getters return types). So what we are doing is more correct but we are paying a heavy price for properties that will never be bound. I've enhanced that property code again, it is smarter now, which helps. I also wired that code up to the build-time-property-checking flags for the first time (defaults to off but you can turn it on) - previously that was only wired to the I've stopped using J11 for this kind of analysis, the unpredictable numbers drive me crazy. So comparing J8 below. Comparing 0.8.2 and 0.9.0: (first are 0.8.2, second are 0.9.0 and third are 0.9.0 with build time property checking turned on):
Some of this included hint tweaks so I need to see a clean samples run on the CI to verify nothing is really broken. I'll do a bit more on it this week whilst these changes bed in. |
My measurements on
webmvc-tomcat
sampleSo there is a regression between 0.8.2 and 0.8.3 we should identify and remove.
Originally raised via https://spring.io/blog/2020/11/23/spring-native-for-graalvm-0-8-3-available-now#comment-5163901805.
The text was updated successfully, but these errors were encountered: