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

Introduce an incremental-build mode for Native Image via Native Image layers #610

Open
vjovanov opened this issue Jul 22, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@vjovanov
Copy link
Member

vjovanov commented Jul 22, 2024

Native Image is introducing support for layers that enable significantly better image-build time for the application.

We should introduce a single flag in build tools (incremental-build) to improve image-build time. This flag would be passed to the Gradle and Maven and would signify that:

  1. The build tools will first build a layer of all application maven dependencies. Although the layer build takes longer than the application, we assume that the maven dependencies don't change often.
  2. For each consecutive build, the build tools would only build the extension image from the classes that are edited by the user.
  3. If there are changes in any of the dependencies, or the relevant flags that affect layers (e.g., the GC used) the base layer would be rebuilt.

Internally, the build tools would require a SHA-256 hash out of ordered JAR files that come from Maven and from all the flags that are passed to the image builder, Native Image version, and the platform. If any of these hashes are changed, the base layer would require a rebuild.

Expected outcome of this ticket is that an average user's turnaround is increased significantly as they will only build images from the application which should be a small subset of the whole binary.

@vjovanov vjovanov added the enhancement New feature or request label Jul 22, 2024
@vjovanov vjovanov changed the title Improve build time with Native Image layers Introduce an incremental-build mode for Native Image via Native Image layers Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants