-
Enhancement
-
Resolution: Fixed
-
P4
-
21
-
b26
The current MethodTypeDesc implementation has a few performance issues. Below are the actionable changes that I recommend:
1. MTD can cache the descriptorString as computation is expensive; and its descriptorString computation can be improved by removing streams and formatting.
2. MTD doesn't have to validate all its arguments (to be non-void) every time a new instance is created, especially for return type swapping and parameter dropping.
3. Since parameterList will be costly, we should replace a few of its occurrences in performance-sensitive area with manually-unrolled loops.
This will most likely replace bug 8306889.
Also a few general side notes:
1. MTD parsing from descriptor is costly, so we can construct from CDs instead, especially if we don't use the descriptor.
2. As a conclusion, MTD should be stored in static final fields in use sites (like constants), such as in SystemModulesPlugin; this will be done in a separate patch.
1. MTD can cache the descriptorString as computation is expensive; and its descriptorString computation can be improved by removing streams and formatting.
2. MTD doesn't have to validate all its arguments (to be non-void) every time a new instance is created, especially for return type swapping and parameter dropping.
3. Since parameterList will be costly, we should replace a few of its occurrences in performance-sensitive area with manually-unrolled loops.
This will most likely replace bug 8306889.
Also a few general side notes:
1. MTD parsing from descriptor is costly, so we can construct from CDs instead, especially if we don't use the descriptor.
2. As a conclusion, MTD should be stored in static final fields in use sites (like constants), such as in SystemModulesPlugin; this will be done in a separate patch.
- csr for
-
JDK-8309755 MethodTypeDesc::descriptorString no longer provides the default implementation
- Closed
- relates to
-
JDK-8304932 MethodTypeDescImpl can be mutated by argument passed to MethodTypeDesc.of
- Resolved
-
JDK-8331114 Further improve performance of MethodTypeDesc::descriptorString
- Resolved
-
JDK-8306889 Convert MethodTypeDescImpl parameter storage from array to immutable list
- Closed
(1 links to)