[jdk26u] RFR: 8374644: Regression in GZIPInputStream performance after JDK-7036144 [v2]
Roland Mesde
duke at openjdk.org
Wed Jan 14 19:27:49 UTC 2026
> 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
>
> Results attached:
>
> [linux-aarch64-specific-test.log](https://github.com/user-attachments/files/24623009/linux-aarch64-specific-test.log)
> [linux-x64-specific-test.log](https://github.com/user-attachments/files/24623010/linux-x64-specific-test.log)
> [macos-aarch64-specific-test.log](https://github.com/user-attachments/files/24623011/macos-aarch64-specific-test.log)
> [windows-x64-specific-test.log](https://github.com/user-attachments/files/24623012/windows-x64-specific-test.log)
Roland Mesde has updated the pull request incrementally with one additional commit since the last revision:
Trigger CI pipeline
-------------
Changes:
- all: https://git.openjdk.org/jdk26u/pull/12/files
- new: https://git.openjdk.org/jdk26u/pull/12/files/925f2994..31149c37
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk26u&pr=12&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk26u&pr=12&range=00-01
Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk26u/pull/12.diff
Fetch: git fetch https://git.openjdk.org/jdk26u.git pull/12/head:pull/12
PR: https://git.openjdk.org/jdk26u/pull/12
More information about the jdk-updates-dev
mailing list