Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-23 Thread Jaikiran Pai
On Sun, 20 Mar 2022 14:05:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which handles >> https://bugs.openjdk.java.net/browse/JDK-8283411? >> >> The commit here moves the temporary byte array from being a member of the >> class to a local variable within the `skip` me

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-23 Thread Alan Bateman
On Sun, 20 Mar 2022 14:05:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which handles >> https://bugs.openjdk.java.net/browse/JDK-8283411? >> >> The commit here moves the temporary byte array from being a member of the >> class to a local variable within the `skip` me

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-21 Thread Jaikiran Pai
On Sun, 20 Mar 2022 14:01:50 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/java/util/zip/InflaterInputStream.java line 206: >> >>> 204: int max = (int)Math.min(n, Integer.MAX_VALUE); >>> 205: int total = 0; >>> 206: byte[] b = new byte[512]; >> >> n may be less

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-20 Thread Vyom Tewari
On Sun, 20 Mar 2022 14:05:58 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which handles >> https://bugs.openjdk.java.net/browse/JDK-8283411? >> >> The commit here moves the temporary byte array from being a member of the >> class to a local variable within the `skip` me

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-20 Thread Jaikiran Pai
> Can I please get a review of this change which handles > https://bugs.openjdk.java.net/browse/JDK-8283411? > > The commit here moves the temporary byte array from being a member of the > class to a local variable within the `skip` method which is the only place > where it is used as a tempora

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes

2022-03-20 Thread Alan Bateman
On Sun, 20 Mar 2022 04:24:07 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which handles > https://bugs.openjdk.java.net/browse/JDK-8283411? > > The commit here moves the temporary byte array from being a member of the > class to a local variable within the `skip` method

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes [v2]

2022-03-20 Thread Jaikiran Pai
On Sun, 20 Mar 2022 13:53:34 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use Alan's suggestion and allocate less than 512 bytes if possible. Plus >> copyright year fix. > > src/java.base/shar

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes

2022-03-20 Thread Jaikiran Pai
Hello Bernd, On 20/03/22 5:00 pm, Bernd Eckenfels wrote: Hello, Not sure how often skip is actually used so it might not matter, but this change would increase allocations if skip is called regularly. I had given this a thought before changing it. The skip doesn't get called in a regular

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes

2022-03-20 Thread Bernd Eckenfels
@openjdk.java.net Betreff: Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes On Sun, 20 Mar 2022 04:24:07 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which handles > https://bugs.openjdk.java.net/browse/JDK-8283411? > > The commit he

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes

2022-03-20 Thread Lance Andersen
On Sun, 20 Mar 2022 04:24:07 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which handles > https://bugs.openjdk.java.net/browse/JDK-8283411? > > The commit here moves the temporary byte array from being a member of the > class to a local variable within the `skip` method

RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes

2022-03-19 Thread Jaikiran Pai
Can I please get a review of this change which handles https://bugs.openjdk.java.net/browse/JDK-8283411? The commit here moves the temporary byte array from being a member of the class to a local variable within the `skip` method which is the only place where it is used as a temporary buffer.