On Mon, 7 Apr 2025 06:34:11 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
> Can I please get a review of this change which proposes to address the > increase in memory footprint of an application that uses signed JAR files, > signed with `SHA-384` digest algorithm? This addresses > https://bugs.openjdk.org/browse/JDK-8353787. > > As noted in that issue and the linked mailing list discussion, it has been > noticed that when JARs signed with `SHA-384` digest algorithm (which is the > default since Java 19) are loaded, the number of `java.util.Attributes$Name` > instances held in memory increase, leading to an increase in the memory > footprint of the application. > > The `Attributes` class has an internal cache which is meant to store `Name` > instances of some well-known manifest attributes. It already has the `Name` > instances for `SHA1-Digest` and `SHA-256-Digest` manifest attributes cached, > but is missing an entry for `SHA-384-Digest`. The commit in this PR adds > `SHA-384-Digest` to that cache. > > Given the nature of this change, no new jtreg test has been introduced and > existing tests in tier1, tier2 and tier3 continue to pass with this change. > I've manually verified that this change does reduce the memory footprint of > an application which has signed JARs with `SHA-384` digest algorithm > (details in a comment of this PR). This pull request has now been integrated. Changeset: b64cdc28 Author: Jaikiran Pai <j...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/b64cdc28132c889ca8e21dc9534590ba2a778bcd Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod 8353787: Increased number of SHA-384-Digest java.util.jar.Attributes$Name instances leading to higher memory footprint Reviewed-by: mullan, lancea ------------- PR: https://git.openjdk.org/jdk/pull/24475