8227080: (fs) Files.newInputStream(...).skip(n) is slow

Brian Burkhalter brian.burkhalter at oracle.com
Tue Jul 2 19:18:58 UTC 2019


https://bugs.openjdk.java.net/browse/JDK-8227080
http://cr.openjdk.java.net/~bpb/8227080/webrev.00/

This patch overrides ChannelInputStream.skip(long) to use SeekableByteChannel.position(long) if the ReadableByteChannel instance is a SeekableByteChannel. The performance improvement on my dev machine for skipping the first 2 GB of a local file is about 3.6 x 10^4.

Thanks,

Brian


More information about the nio-dev mailing list