What are Leyden's plans to minimize application footprint, specifically disk footprint?

Alan Bateman Alan.Bateman at oracle.com
Fri Apr 12 09:06:39 UTC 2024


On 11/04/2024 23:37, David Alayachew wrote:
> :
>
> * There's the 2 modules -- java.base and java.desktop. Unfortunately, 
> they also happen to be the 2 biggest modules in the entirety of the 
> JDK. Sometimes, I wonder "Why are they that large? Could they have 
> been broken down further? Might that happen in the future?"
>

The SO post that you linked to doesn't mention --strip-debug which will 
strip the debug attributes from the class files. That should reduce the 
size by another few MBs but at the cost of less useful stack traces.

There are at least 5 modules if you have included java.desktop. Look at 
the  "release" file in the top-level directory of the generated run-time 
image to see full set. You'll see java.xml in the set, another large 
module, because there are APIs in java.desktop (particularly in image 
I/O) that have XML types in method signatures.

Almost all exploration in the past into splitting the APIs for 
AWT/Swing/Image/Sound/etc. into cohesive modules came to nothing because 
of all the cross references between these APIs. The exception is the 
java.awt.datatransfer module which provides something cohesive in non-UI 
contexts, e.g. XML binding and web services APIs. One thing that isn't 
there is a jlink plugin for limiting java.desktop to "headless mode", 
interesting for server environments that do things like process images 
and thus use APIs from the java.desktop module.

So right now, I'm not aware of any effort to re-visit the java.desktop 
module. Efforts have tended to focus more on compression and reducing 
the size of existing bits. Maybe in the future that closed work 
assumptions could help but right now the API surface (and resulting 
implementation) is huge.

-Alan




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20240412/66e6873f/attachment.htm>


More information about the leyden-dev mailing list