-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Document support for AppCDS #31497
Comments
Looking at the current usage, I am not sure we want to introduce something specifically for the purpose of creating the class archive. Using the To get a bit of clarity of how this is being used, I work on a little JVM log parser that produces a report of how CDS was effective for a particular run. We still need to match those with actual benchmark numbers. |
The past few days, we've been working on a prototype that could improve the exploded executable JAR use case. That proves to be quite effective with AppCDS. see spring-projects/spring-boot#38276 |
With #31595, it's really about providing a few pointers for anyone building applications on top of the spring framework. We expect that additional guidance can be provided at the Spring Boot level when time permits. |
We want to explore the ability for a Spring-based app to run in a mode at build-time that allows recording various information that can be reused to optimize the actual app. We do this already with our Spring AOT engine that triggers application context parsing. During this special refresh phase (called
refreshForAot
) only a subset of the standard callbacks are invoked to prevent bean instantiation as much as possible.The purpose of this issue is to see how that can be generalized or made a little bit more easy for tools to trigger it. The first candidate is AppCDS but there might be other components that need a "training run" of the app in a certain mode.
Concretely, we'd like to achieve the following:
refresh
so that the app starts in a well-defined mode. This mode should be set externally so that the build-tool can have an impact on the application startup without any additional code changeWithout any tooling, the following example could provide the class archive:
-Dspring.context.exit=onRefresh
(see #31595) allows to tune the refresh phase, forcing the context to shut down once it has reached the requested phase so that the process stops and write the archive.Spring Boot has additional tooling that could be reused to make that even more transparent for users.
The text was updated successfully, but these errors were encountered: