8227080: (fs) Files.newInputStream(...).skip(n) is slow
Simone Bordet
simone.bordet at gmail.com
Tue Jul 2 22:32:48 UTC 2019
Hi,
On Wed, Jul 3, 2019 at 12:00 AM Brian Burkhalter
<brian.burkhalter at oracle.com> wrote:
> Here is an updated version which should not have a problem with overflow:
>
> http://cr.openjdk.java.net/~bpb/8227080/webrev.01/
Why:
return sbc.position() - pos;
rather than just:
return n;
Unless SeekableByteChannel.position(int) may not actually set the
position to the given value, which I can't quite believe (as the
javadoc says it is permitted to set it to a larger value than the
current size)?
Will you tackle the missing synchronization in another webrev?
Thanks!
--
Simone Bordet
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz
More information about the nio-dev
mailing list