6916202: (so) improve scatter/gather implementation
Chris Hegarty
chris.hegarty at oracle.com
Tue Jul 27 07:51:46 PDT 2010
Alan,
To clarify ( sent in a private mail ), the bug number is 6971825 and the
webrev is:
http://cr.openjdk.java.net/~alanb/6971825/webrev
Comments:
Util.getTemporaryDirectBuffer. If reading/writing in non
scattering/gathering it looks like a new buffer will be created every
time. Should L64 be i <= count?
Indentation for "throw new IndexOutOfBoundsException();" in
DatagramChannelImpl and FileChannelImpl seems to be only three spaces.
The temporary buffer cache is no longer SoftRefs. Do you see any
potential side effect of this? Is this deliberate?
IOUtil.write/read. Releasing the shadow buffer and clearing the vec refs
could just be done in the finally block with need for completed. But
then your committing to a second loop, where as with what you have the
second loop is only necessary if there is a failure, right?
It looks like now you can only read/write with a limit of 8 buffers,
where as before it just spilled over to creating short lived direct
buffers. I think this should be sufficient, just an observation that we
don't spill anymore.
-Chris.
Alan Bateman wrote:
> Chris Hegarty wrote:
>> I think you used the wrong bug number, 6971825 right?
>>
>> -Chris.
> 6916202 was one I was looked at with Vinnie last night :-)
>
> Here's the webrev:
> http://cr.openjdk.java.net/~alanb/6971825/webrev/
>
> Just so you know, this one is for 6u22m but I want to get it into jdk7
> and let it bake for a bit first. I've asked Sherman to review it too
> (the more eyes the better as the changes are tricky).
More information about the nio-dev
mailing list