RFR: 8357728: Optimize Executable#synthesizeAllParams
Joe Darcy
darcy at openjdk.org
Fri Jul 18 17:03:01 UTC 2025
On Tue, 24 Jun 2025 22:32:30 GMT, Chen Liang <liach at openjdk.org> wrote:
> Currently, fake parameters are created with "arg0" etc. strings that are retained for class file methods with no MethodParameters attribute. The original issue report observes many of these strings present in the heap. To address this issue, we can remove these eagerly created fake names, bringing their behavior in line with nameless parameters from MethodParameters attribute, such as those from inner class constructors. A unit test verifies that no name is retained in the Parameter object when the name is fake.
>
> The original report recommends using a pool to store the arg name strings. I did not take that approach as I don't think it is very necessary; if the issue of retained fake names persist, we can update `Parameter::getName` to return fake names from a pool instead.
@liach , please file a CSR for the behavioral change here.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25961#issuecomment-3090040953
More information about the core-libs-dev
mailing list