JDK-6631495 : Replace reflection calls to accessor within AWT
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: linux
  • CPU: generic
  • Submitted: 2007-11-19
  • Updated: 2021-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
There are a places in JDK where we use reflection to access private API and they might be replaced with use of accessor inside the private package. Experiments shows that it give better performance.
Results for JDK 6u4_b07 32bit Windows (mean from 10 runs, 10M iterations each):
	client JIT compiler:
		Accessor:                            9.319946s  =   100%
		ReflectionAccessor:          18.852525s  =   202%
		NativeMultipleAccessor:   14.095550s  =   151%
		NativeSingleAccessor:      17.144522s  =   184%
	
	server JIT compiler:
		Accessor: 		           7.610554s  =  100%
		ReflectionAccessor:           8.581948s  =  113%
		NativeMultipleAccessor:  11.355820s  =  149%
		NativeSingleAccessor:     13.020513s  =  171%

Linux x64 results:
    pkg.pkg2.Accessor: 100%         
    static java getters pkg.pkg2.ReflectionAccessor: 157 %
    reflection pkg.pkg2.NativeMultipleAccessor: 192%
    native getters through JNI_getFieldValue
    pkg.pkg2.NativeSingleAccessor:  242%
    single native getter which returns multiple field values as an array