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

Bernd Eckenfels ecki at zusammenkunft.net
Sun Mar 20 11:30:20 UTC 2022


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. Not sure if EA can prevent that if it is only medium hot and therefore the callsite is not compiled or inlined?

An alternative would be to make this static and/or allocate lazy (or even share it with more places which need a write-only array?)

Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
Von: core-libs-dev <core-libs-dev-retn at openjdk.java.net> im Auftrag von Lance Andersen <lancea at openjdk.java.net>
Gesendet: Sunday, March 20, 2022 11:51:23 AM
An: core-libs-dev at openjdk.java.net <core-libs-dev at 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 <jpai at openjdk.org> 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 which is the only place where it is used as a temporary buffer.
>
> tier1, tier2, tier3 tests have been run successfully with this change.

Hi Jaikiran,

This looks fine.  Please add the label noreg-trivial to the bug otherwise you will get a ping as there is no test associated with the PR

-------------

Marked as reviewed by lancea (Reviewer).

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


More information about the core-libs-dev mailing list