RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes
Jaikiran Pai
jai.forums2013 at gmail.com
Sun Mar 20 12:18:37 UTC 2022
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 jar/zip entry content retrieval use case (which from
what I can see is the most used one). So instead of allocating an
additional 512 bytes, holding onto it till the stream is closed and
never using it, for each entry of a zip whose content is fetched, I
think it's better to allocate it only when needed in skip().
-Jaikiran
More information about the core-libs-dev
mailing list