zlib configuration : system vs. bundled

Alan Bateman Alan.Bateman at oracle.com
Fri May 17 07:47:02 UTC 2019


On 16/05/2019 15:18, Baesken, Matthias wrote:
> Hello Alan,
>
> I found
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-March/032106.html
>
> and
>
> http://mail.openjdk.java.net/pipermail/build-dev/2016-February/thread.html#16602
>
> but without much details  on   real  or potential  performance improvements .
>
> Both discussion  threads are pretty old.  I do not think they cover  the  changes  done in the meantime in   jdk9 and higher    in the java.util.zip package .
> I think a lot of coding there moved  from C  to  Java ,  so  the libz   is used in JDK  less these days than  in  the "old times " .
Yes, the ZipFile implementation has changed significantly (many of the 
motivations are listed in JDK-8142508) but the compression and checksum 
(except CRC32C) will use libz. You'll see hotspot using it too, say when 
running with -Xbootclasspath/a to add a JAR file to the boot class path. 
There has many threads here and on core-libs-dev about using the bundled 
vs. system zlib. It was an issue for the Linux distros in the early days 
of OpenJDK as they have policies to not include copies of libraries that 
the OS provides. At one point there was a patch proposing a XX option to 
select the system vs. bundled zlib at run-time, the motivation being to 
be able to switch to the Intel IPP implementation. It's impossible to 
please everyone but I think the default that we settled on is probably 
the best.

-Alan



More information about the build-dev mailing list