Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v6]

2021-03-15 Thread Sergey Bylokhov
On Mon, 15 Mar 2021 18:04:26 GMT, Сергей Цыпанов 
 wrote:

>> In some cases wrapping of `InputStream` with `BufferedInputStream` is 
>> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which 
>> does not require any buffer having one within.
>> 
>> Other cases are related to reading either a byte or short `byte[]`: in both 
>> cases `BufferedInputStream.fill()` will be called resulting in load of much 
>> bigger amount of data (8192 by default) than required.
>
> Сергей Цыпанов has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Revert HttpClient

Marked as reviewed by serb (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/2992


Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v6]

2021-03-15 Thread Daniel Fuchs
On Mon, 15 Mar 2021 18:01:20 GMT, Сергей Цыпанов 
 wrote:

>> In some cases wrapping of `InputStream` with `BufferedInputStream` is 
>> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which 
>> does not require any buffer having one within.
>> 
>> Other cases are related to reading either a byte or short `byte[]`: in both 
>> cases `BufferedInputStream.fill()` will be called resulting in load of much 
>> bigger amount of data (8192 by default) than required.
>
> Сергей Цыпанов has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Revert HttpClient

LGTM. Thanks!

-

Marked as reviewed by dfuchs (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2992


Re: RFR: 8263560: Remove needless wrapping with BufferedInputStream [v6]

2021-03-15 Thread Сергей Цыпанов
> In some cases wrapping of `InputStream` with `BufferedInputStream` is 
> redundant, e.g. in case the wrapped one is `ByteArrayOutputStream` which does 
> not require any buffer having one within.
> 
> Other cases are related to reading either a byte or short `byte[]`: in both 
> cases `BufferedInputStream.fill()` will be called resulting in load of much 
> bigger amount of data (8192 by default) than required.

Сергей Цыпанов has updated the pull request incrementally with one additional 
commit since the last revision:

  Revert HttpClient

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2992/files
  - new: https://git.openjdk.java.net/jdk/pull/2992/files/ff25cc4d..af4fcce4

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=2992=05
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=2992=04-05

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2992.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2992/head:pull/2992

PR: https://git.openjdk.java.net/jdk/pull/2992