> 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 two additional commits since the last revision: - addressed CSR review comments - fixed CompilationIDMapper does not allow multiple instances ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19006/files - new: https://git.openjdk.org/jdk/pull/19006/files/b4203cfd..21515ec2 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19006&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19006&range=07-08 Stats: 62 lines in 2 files changed: 61 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19006.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19006/head:pull/19006 PR: https://git.openjdk.org/jdk/pull/19006