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

Advance the Programming Model for Application Initialization at Build Time #4922

Open
christianwimmer opened this issue Sep 11, 2022 · 0 comments
Assignees
Labels

Comments

@christianwimmer
Copy link

TL;DR

The existing Feature mechanism allows applications to be partly initialized at image build time. That is usually used together with the option --initialize-at-build-time to initialize classes at image build time. We want to advance the programming model so that fewer classes need to be manually marked as "initialize at build time", and so that it is easier to run individual methods at image build time.

Goals

  • Reduce the need to use --initialize-at-build-time: Only classes that have instances on the image heap need to be explicitly marked as "initialize at build time".
  • Provide a registration mechanism (probably annotation-based at first) to execute individual methods at image build time.

Non-Goals

  • The changes will be neutral regarding peak performance and startup performance. There should be no regressions, but there will be also no improvements until users start to leverage the new mechanism.
  • There should be no compatibility issues: applications that are properly configured for initialization at build time / run time should continue to work.

Details

Details about the new class initialization strategy, including a prototype implementation, are available here: #4684

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

No branches or pull requests

2 participants