Skip to content

Improve support for running with AOT cache file #327

@Sheikah45

Description

@Sheikah45

Java has recently released new features that build on the CDS with the concept of Ahead of Time Class Linking and Method Profiling to enable faster startup and warmup of applications. These were implemented in JEP 483 and JEP 515 with more enhancements in development.

Currently in order to utilize an AOT cache that was generated from a training run the module path must be the same as the module path used in the training run. This means that directories cannot be included in the module path as java has no way of knowing that the files are the same.

Currently when an application is jlinked a module path reference to the app folder is added in the launch scripts. It is noted that the app folder is only populated when a custom image is used but the module path entry is always present. To help support the first steps towards including a usable aot file in the jlink image the path to module path entry of the app folder should only be included if a custom image is used.

This could also be extended to if the app folder is populated each included jar is listed individually so that the aot could be used even with a custom image.

Currently as a workaround I am supplying my own templates to the launcher script generation that remove the /app module path entry. This can be seen in the following files. https://github.com/FAForever/Neroxis-Map-Generator/pull/478/changes#diff-b56214ca831296b0ed5115fdb26ac175ca4ba3fb2a597a40344c79ae68d98172L35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions