Open longshorej opened 5 years ago
I wonder if this could help with memory usage as well? Does the JIT compiling of classfiles happen per class loader, or per JVM somehow? My guess is per classloader, so it may not necessarily help, but perhaps worth investigation.
I believe it is per class loader - there’s some info here: https://github.com/landlord/landlord/blob/master/README.md#considerationstrade-offs
Given many JVM applications with similar dependencies, where fatjars are not used:
flatmate could provide a build-time tool that copies all jars into a directory, named by the hash of their contents, and then sets up symbol links into the lib folder of each application. This way, only one copy of each jar would need to be in the resulting image.
Potential directory structure: