[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: RFR: 8331291: java.lang.classfile.Attributes class performs a lot of static initializations [v8]
From:       Claes Redestad <redestad () openjdk ! org>
Date:       2024-05-14 8:26:05
Message-ID: L7Wg46wRNI3kv9XELZ-8XNC1YlRZRwU1Vdr5vwxOaM0=.c634a5dd-a801-488e-b020-3cf0335d62ed () github ! com
[Download RAW message or body]

On Mon, 6 May 2024 18:24:25 GMT, Adam Sotona <asotona@openjdk.org> wrote:

> > Hi,
> > During performance optimization work on Class-File API as JDK lambda generator we \
> > found some static initialization killers. One of them is \
> > `java.lang.classfile.Attributes` with tens of static fields initialized with \
> > individual attribute mappers, and common set of all mappers, and static map from \
> > attribute names to the mappers. 
> > I propose to turn all the static fields into lazy-initialized static methods and \
> > remove `PREDEFINED_ATTRIBUTES` and `standardAttribute(Utf8Entry name)` static \
> > mapping method from the `Attributes` API class. 
> > Please let me know your comments or objections and please review the \
> > [PR](https://github.com/openjdk/jdk/pull/19006) and \
> > [CSR](https://bugs.openjdk.org/browse/JDK-8331414), so we can make it into 23. 
> > Thank you,
> > Adam
> 
> Adam Sotona has updated the pull request incrementally with one additional commit \
> since the last revision: 
> fixed tests

Thank you for this!

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

Marked as reviewed by redestad (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19006#pullrequestreview-2054638558


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic