-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b156
-
Not verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8174577 | 10 | Claes Redestad | P3 | Resolved | Fixed | b01 |
Since 9-b119, when loading java.util.regex a number of lambdas are eagerly created, for example Pattern.DOT, UNIXDOT, VertWS, HorizVS.
These seem to be statically created only to support j.u.r.PrintPattern, which seems to be a utility only used for debugging which relies on lambda identity that is currently unused (only referenced from commented out code)
I see two alternatives here.
1. move the statically created lambdas to an internal holder to allow them to be lazily created
2. remove j.u.r.PrintPattern and move all the statically created lambdas in Pattern into methods
Both options reduce number of classes loaded transitively when touching Pattern by 10
These seem to be statically created only to support j.u.r.PrintPattern, which seems to be a utility only used for debugging which relies on lambda identity that is currently unused (only referenced from commented out code)
I see two alternatives here.
1. move the statically created lambdas to an internal holder to allow them to be lazily created
2. remove j.u.r.PrintPattern and move all the statically created lambdas in Pattern into methods
Both options reduce number of classes loaded transitively when touching Pattern by 10
- backported by
-
JDK-8174577 Reduce number of lambdas created when loading java.util.regex.Pattern
-
- Resolved
-
- relates to
-
JDK-8168911 Increased number of classes initialized during initialization of SignatureFileVerifier
-
- Closed
-