Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Development/490171

Design Specification: Evaluate if MethodHandle use would result in performance improvement

Using MethodHandle (from java.lang.invoke/JSR-292) instead of java.lang.reflect.Method/Field can improve performance. We should adopt new approach wherever it makes sense to do so in code.

ER 490171

Document History

Date Author Version Description & Notes
22/03/2016 Petros Splinakis Document creation

Project overview

Using MethodHandle (from java.lang.invoke/JSR-292) instead of java.lang.reflect.Method/Field can improve performance.

Goals:

  • Use MethodHandle instead of reflection wherever it makes sense to do so (MethodHandle can be cached for multiple calls)

Concepts

Caching MethodHandle objects and reusing them results in better performance than using cached Field/Method objects.

Requirements

The following sections will expand the goals of this project into more concrete requirements.

Design Constraints

It does not make sense to use MethodHandle if reuse is not expected, as the overhead of creating it is bigger than using reflection.

Design / Functionality

Testing

Performance tests need to be added to demonstrate that usage of MethodHandle has resulted in performance improvement.

API

No API change is expected, this change should be kept internal to EclipseLink code.

GUI

N/A

Config files

A configuration option should be considered to be added to toggle between the different implementation approaches.

Documentation

MethodHandle evaluation test execution results: MethodHandleTest.txt.zip

Open Issues

This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.

Issue # Owner Description / Notes

Decisions

This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.

Issue # Description / Notes Decision

Future Considerations

During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.

Back to the top