On Thu, Oct 17, 2024 at 9:49 PM Phil Race <p...@openjdk.org> wrote:
> > In general dependencies on the the desktop module are an obstacle to > making FX > an independent toolkit. We already have that situation of course, but > making it > more common is the wrong direction, unless you think it an unrealistic goal > But even then, mobile & embedded uses of FX wouldn't want to always have to > drag in the desktop module. > I totally agree. It is a (maintenance) nightmare to make sure the whole java.desktop module is available and works on mobile and embedded, while only a tiny fraction of it is used. And even for purely desktop apps, the overhead of including the java.desktop module in an application is significant. I often see people comparing the binary size of a JavaFX app versus a similar Electron app, and it's a pity that the size of JavaFX apps is negatively influenced by something that is barely used (that is, most of the bytes in the java.desktop module are never used in JavaFX). In the ideal world, I think a more granular javax.imageio module could be a solution. That could then be leveraged by the javafx modules. Theoretically, the java.desktop maintainers could leverage that module as well, and remove the internals from java.desktop, but that is not something we should discuss on this list. - Johan