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

Optimize native footprint by avoiding using ModuleFinder.ofSystem() at runtime #29183

Closed
sdeleuze opened this issue Sep 21, 2022 · 1 comment
Closed
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Milestone

Comments

@sdeleuze
Copy link
Contributor

#28506 introduced JPMS support in PathMatchingResourcePatternResolver by using ModuleFinder.ofSystem(), but it has introduced a significant footprint increase on native (close to 2M RSS) due to the transitive usage of JarVerifier and related crypto classes.

This commit skip ModuleFinder.ofSystem() usage on native since JPMS usage is pretty niche, so it is probably ok to skip it on native. We may be able to re-introduce JPMS on native support there if we achieve to support this use case via #29081.

@sdeleuze sdeleuze added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Sep 21, 2022
@sdeleuze sdeleuze added this to the 6.0.0-RC1 milestone Sep 21, 2022
@sdeleuze sdeleuze self-assigned this Sep 21, 2022
@sbrannen
Copy link
Member

sbrannen commented Sep 25, 2022

While working on #29163, I have encountered the following error.

    => com.oracle.svm.core.jdk.UnsupportedFeatureError: JRT file system is disabled
       com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:89)
       jdk.internal.module.SystemModuleFinders$SystemImage.reader(SystemModuleFinders.java:139)
       jdk.internal.module.SystemModuleFinders$ModuleContentSpliterator.<init>(SystemModuleFinders.java:527)
       jdk.internal.module.SystemModuleFinders$SystemModuleReader.list(SystemModuleFinders.java:502)
       org.springframework.core.io.support.PathMatchingResourcePatternResolver.lambda$findAllModulePathResources$6(PathMatchingResourcePatternResolver.java:819)

In light of that, I am reopening this issue and co-assigning it to me since I'll work on a fix.

@sbrannen sbrannen reopened this Sep 25, 2022
@sbrannen sbrannen self-assigned this Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants