On Wed, 13 Apr 2022 15:09:27 GMT, Roger Riggs wrote:
>>> I recommend moving `nr` declaration from the beginning of the method to
>>> where it's actually used (here)
>>
>> @liach done.
>
> Sorry, I misunderstood your earlier comment: "Sounds reasonable and applied"
> as concurring with not
, 2022 11:58:06 PM
An: core-libs-dev@openjdk.java.net
Betreff: Re: RFR: 8284638: store skip buffers in InputStream Object [v2]
On Wed, 13 Apr 2022 16:02:10 GMT, Alan Bateman wrote:
>>> @AlanBateman You are correct about this. But I wonder if this be a problem,
>>> why Reader clas
On Wed, 13 Apr 2022 16:02:10 GMT, Alan Bateman wrote:
>>> @AlanBateman You are correct about this. But I wonder if this be a problem,
>>> why Reader class can afford store a skip buffer for each Reader.
>>>
>>> Is there anything different in the situations about skipBuffer in Reader
>>> and
On Wed, 13 Apr 2022 15:03:22 GMT, Alan Bateman wrote:
>> This change may be problematic for servers with a large number connections
>> and an input stream for each connection. It could add up to 2k to the
>> footprint of each connection when skip is used.
>
>> @AlanBateman You are correct
On Wed, 13 Apr 2022 15:03:22 GMT, Alan Bateman wrote:
>> This change may be problematic for servers with a large number connections
>> and an input stream for each connection. It could add up to 2k to the
>> footprint of each connection when skip is used.
>
>> @AlanBateman You are correct
On Wed, 13 Apr 2022 15:03:22 GMT, Alan Bateman wrote:
> > @AlanBateman You are correct about this. But I wonder if this be a problem,
> > why Reader class can afford store a skip buffer for each Reader.
> > Is there anything different in the situations about skipBuffer in Reader
> > and
On Wed, 13 Apr 2022 14:52:20 GMT, XenoAmess wrote:
>> It indeed is reallocated when the existing one is not large enough.
>
>> I recommend moving `nr` declaration from the beginning of the method to
>> where it's actually used (here)
>
> @liach done.
Sorry, I misunderstood your earlier
On Wed, 13 Apr 2022 14:36:17 GMT, Alan Bateman wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> add MIN_SKIP_BUFFER_SIZE
>
> This change may be problematic for servers with a large number connections
> and an input
On Wed, 13 Apr 2022 14:51:34 GMT, liach wrote:
>> The check for `skipBuffer.length < size` makes it appear that the buffer can
>> be re-allocated.
>> If it is allocated once then only the `skipBuffer == null` is needed.
>>
>> The code may be simpler if the 'size' variable is removed.
>>
>>
On Wed, 13 Apr 2022 14:45:31 GMT, Roger Riggs wrote:
>> src/java.base/share/classes/java/io/InputStream.java line 557:
>>
>>> 555:
>>> 556: while (remaining > 0) {
>>> 557: nr = read(skipBuffer, 0, (int)Math.min(size, remaining));
>>
>> I recommend moving `nr` declaration
On Tue, 12 Apr 2022 23:13:26 GMT, liach wrote:
>> XenoAmess has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> add MIN_SKIP_BUFFER_SIZE
>
> src/java.base/share/classes/java/io/InputStream.java line 557:
>
>> 555:
>> 556: while
On Wed, 13 Apr 2022 14:36:17 GMT, Alan Bateman wrote:
> This change may be problematic for servers with a large number connections
> and an input stream for each connection. It could add up to 2k to the
> footprint of each connection when skip is used.
@AlanBateman
You are correct about this.
On Tue, 12 Apr 2022 22:19:18 GMT, XenoAmess wrote:
>> @jmehrens what about this then?
>> I think it safe now(actually this mechanism is learned from Reader)
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> add
On Tue, 12 Apr 2022 22:15:22 GMT, XenoAmess wrote:
> What subclasses of InputStream in the JDK do not override skip(n)?
>From a peek, the majority of subclasses do not override `skip(long)`. Most
>overrides are delegations or optimizations for random access structures; but
>there are some
On Tue, 12 Apr 2022 22:19:18 GMT, XenoAmess wrote:
>> @jmehrens what about this then?
>> I think it safe now(actually this mechanism is learned from Reader)
>
> XenoAmess has updated the pull request incrementally with one additional
> commit since the last revision:
>
> add
On Tue, 12 Apr 2022 20:39:52 GMT, Roger Riggs wrote:
> Without specific information about use cases, there isn't enough information
> to craft a good algorithm/solution and simplicity is preferred. The
> MAX_SKIP_BUFFER_SIZE is 2048 (not 8192).
>
> What subclasses of InputStream in the JDK do
> @jmehrens what about this then?
> I think it safe now(actually this mechanism is learned from Reader)
XenoAmess has updated the pull request incrementally with one additional commit
since the last revision:
add MIN_SKIP_BUFFER_SIZE
-
Changes:
- all:
17 matches
Mail list logo