-
Notifications
You must be signed in to change notification settings - Fork 36
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
Convert most classes to use @CompileStatic
#46
Comments
Noting that Gretty 2.x still claims in docs to support Gradle 1.10 !!, although surely hardly anyone relies on that (nor should they) and we certainly don't test it. I understand |
Hoping that @wolfs or @rwinch can validate an initial/basic approach for this, and the results, or anyone else with Here's what I tried: Baseline data:
Approach
ResultsCompletely unscientific, anecdotal from a single run.
CommentSeems like an overall improvement, but apart from one dynamic change, nothing spectacular. Questions
|
@javabrett Thank you for trying it out! Regarding your numbers above: I don't understand why these improvements would be caused by adding So the improvement would be in configuration time of the build. I guess all the above projects are small, right? So you wouldn't even notice configuration time improvements. Did you restart the daemon between runs? If not, then the time improvement is due to having a warm daemon. If you want to do some performance measurements, please use gradle-profiler. That would allow you to get more accurate measurements. Moreover, for testing the configuration time improvements, you would need a sufficiently big project (maybe 100 sub-projects), each applying the Jetty plugin. Note that it is not necessary to convert all classes to |
Thanks @wolfs for the comments and help.
I think that was my reaction to the issue summary "Convert most classes to use @CompileStatic" and "Using CompileStatic on a significant number if not on all classes" :).
So that might be in There's also https://github.com/gretty-gradle-plugin/gretty/blob/master/integrationTests/buildSrc/gretty-integrationTest/src/main/groovy/org/akhikhl/gretty/internal/integrationTests/BasePlugin.groovy#L109 for dev.
I think this refers to a Gradle build of a project which applies the Gretty project once or more (rather than the build of the Gretty project itself).
The timing numbers refer to builds which run
I was tempted to ask what a canonical test for performance-improvements might look like before I started - sounds like this is it. |
The configuration-time performance improvement from adding A subsequent Thanks @rwinch for the report and @wolfs and @oehme for the profiler support. |
The Gretty plugin can have a negative impact on configuration time since all of it currently uses dynamic Groovy. Using
CompileStatic
on a significant number if not on all classes would improve configuration time already a lot.The text was updated successfully, but these errors were encountered: