[jdk25u-dev] RFR: 8374644: Regression in GZIPInputStream performance after JDK-7036144
Roland Mesde
duke at openjdk.org
Mon Jan 26 20:09:09 UTC 2026
On Wed, 14 Jan 2026 16:44:43 GMT, Goetz Lindenmaier <goetz at openjdk.org> wrote:
>> Backporting JDK-8374644: Regression in GZIPInputStream performance after JDK-7036144
>>
>> This PR fixes a performance regression in GZIPInputStream introduced in JDK 23 by JDK-7036144. The original change replaced InputStream.available() with explicit InputStream.read() calls to detect concatenated GZIP streams, but this caused EOFException construction in the common case of single GZIP streams.
>>
>> Since Throwable construction involves expensive stacktrace filling, this created a performance regression for the most common use case. The fix introduces an alternate code path in readHeader() that avoids EOFException generation when the stream has reached EOF, restoring performance to JDK 22 levels while maintaining the functional improvements from JDK-7036144.
>>
>> This backport has internal demand.
>>
>> Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
>>
>> make test TEST=test/jdk/java/util/zip/GZIP
>>
>> Results attached:
>>
>> [linux-x64-specific-test.log](https://github.com/user-attachments/files/24574341/linux-x64-specific-test.log)
>> [linux-aarch64-specific-test.log](https://github.com/user-attachments/files/24574343/linux-aarch64-specific-test.log)
>> [windows-x64-specific-test.log](https://github.com/user-attachments/files/24574344/windows-x64-specific-test.log)
>> [macos-aarch64-specific-test.log](https://github.com/user-attachments/files/24574345/macos-aarch64-specific-test.log)
>
> Hi Roland,
> please backport to 26 first.
@GoeLin Though it is driven by internal customer demand, the variety of the downstream applications expose use cases that would be valuable to address for the greater user base and help with the JDK 25 adaption.
-------------
PR Comment: https://git.openjdk.org/jdk25u-dev/pull/139#issuecomment-3801523686
More information about the jdk-updates-dev
mailing list