Using NIO FS in java.util.zip.ZipFile

Alan Bateman Alan.Bateman at oracle.com
Fri Jul 12 16:58:07 UTC 2024



On 12/07/2024 17:46, Konstantin Nisht wrote:
> > Is there a brief summary on what the performance is?
> It takes 1 minute 20 seconds to open a 12 kb zip file located on the 
> Linux side of WSL from Windows. The same file can be opened in 0.02 
> seconds if located on Windows.
> This problem is in the implementation of 9P by Microsoft, but it is 
> quite difficult to workaround it, especially when we have clients that 
> use pure java.io 
> <https://urldefense.com/v3/__http://java.io__;!!ACWV5N9M2RV99hQ!KowmBF66mgxvmW_n3a0ATp5w0P9Go4mGHYtZF_iLFsfLWCc9J3qA4t8f_BiQ-1OBthJeiIMQ4dNkEG9w11sY0eQ7gcRsqZg$>. 
>
>
> > The motive for these prototypes is virtual threads.
> Could you clarify how FileChannel helps here?

Essentially the same reason that Socket, DatagramSocket etc. were 
changed to use NIO with JEP 353 JEP 373. There is significant surgery 
requirement to allow virtual threads relase their carrier for file 
operations. This is not something for the short term of course, I'm just 
pointing out other efforts to re-implement RAF that is not observable 
except a very small startup regression at this point.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/nio-dev/attachments/20240712/ba5b5e34/attachment.htm>


More information about the nio-dev mailing list