What are Leyden's plans to minimize application footprint, specifically disk footprint?
David Alayachew
davidalayachew at gmail.com
Sun Apr 14 04:19:30 UTC 2024
Thank you very much for the response Alan! I spoke to the answerer on SO,
and got all of this info added. Very much appreciated!
Do you have any thoughts on the main question I asked? Java is doing
amazing work to make programs faster and safer. Ultimately, my main
question is to see if anything is being done to also minimize disk size of
its generated binaries.
On Fri, Apr 12, 2024 at 5:07 AM Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> 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/20240414/e09df4e1/attachment.htm>
More information about the leyden-dev
mailing list