-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta
-
x86
-
windows_nt
The enclosed sample program (using the latest copy of the
classes in java.beans.* in both cases) takes 7s on the VM of
1.3 and 112s on the latest promoted build of 1.4 (57). [This
was tested on a dual ~300MHz pentium running NT). It seems
that the new optimisations to the reflection package improve the
speed of reflective calls in tight loops at the expense of code
that invokes a large number of methods a small number of times.
There are many applications in client-side java which use
the reflection package in the latter mode. In the beans
package, two good examples are: the java.beans.Introspector which
is used by builders to interrogate visual "JavaBeans" and
the java.beans.Expression class which facilitates use of an
interpretive method invocation (c.f. the "perform" method of SmallTalk
or Objective-C). The Statement and Expression classes are used to
read and write "version resilient" archives of object graphs.
The upper bound on the number of times a method will be invoked
in the Expression class is 1, meaning that perfomance is
much more sensitive to the time taken to search for methods
with a given signature than it is to the time taken to
do the reflective invocation of a method.
classes in java.beans.* in both cases) takes 7s on the VM of
1.3 and 112s on the latest promoted build of 1.4 (57). [This
was tested on a dual ~300MHz pentium running NT). It seems
that the new optimisations to the reflection package improve the
speed of reflective calls in tight loops at the expense of code
that invokes a large number of methods a small number of times.
There are many applications in client-side java which use
the reflection package in the latter mode. In the beans
package, two good examples are: the java.beans.Introspector which
is used by builders to interrogate visual "JavaBeans" and
the java.beans.Expression class which facilitates use of an
interpretive method invocation (c.f. the "perform" method of SmallTalk
or Objective-C). The Statement and Expression classes are used to
read and write "version resilient" archives of object graphs.
The upper bound on the number of times a method will be invoked
in the Expression class is 1, meaning that perfomance is
much more sensitive to the time taken to search for methods
with a given signature than it is to the time taken to
do the reflective invocation of a method.
- relates to
-
JDK-4419628 AWTKeyStroke should cache VK_ constants for performance improvement
-
- Resolved
-
-
JDK-4279970 Reflection performance
-
- Closed
-
-
JDK-4458667 Severe performance regression in reflection implementation still present in b64.
-
- Closed
-