-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b23
-
x86
-
windows_7
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2225647 | 7u6 | Sergey Malenkov | P3 | Resolved | Fixed | b17 |
FULL PRODUCT VERSION :
Java 7u2
A DESCRIPTION OF THE PROBLEM :
Bad performance when a bean method from the PropertyDescriptor is invoked.
see https://forums.oracle.com/forums/thread.jspa?forumID=933&threadID=2322123
REGRESSION. Last worked in version 6u29
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the provided test case - with Java 6 it takes around 100ms with Java 7 around 5000ms.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Execution time around 100ms
ACTUAL -
Execution time around 5000ms
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.beans.PropertyDescriptor;
import javax.swing.JComponent;
import javax.swing.JPanel;
public class PropertyDescriptorTest
{
public static void main(String[] args)
{
JComponent c = new JPanel();
String name = "name";
long start = System.currentTimeMillis();
try
{
for (int i=0; i<1000; i++)
new PropertyDescriptor(name, c.getClass()).getReadMethod().invoke(c);
}
catch (Exception e)
{
e.printStackTrace();
}
long stop = System.currentTimeMillis();
System.err.println(stop-start);
}
}
---------- END SOURCE ----------
Java 7u2
A DESCRIPTION OF THE PROBLEM :
Bad performance when a bean method from the PropertyDescriptor is invoked.
see https://forums.oracle.com/forums/thread.jspa?forumID=933&threadID=2322123
REGRESSION. Last worked in version 6u29
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Execute the provided test case - with Java 6 it takes around 100ms with Java 7 around 5000ms.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Execution time around 100ms
ACTUAL -
Execution time around 5000ms
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.beans.PropertyDescriptor;
import javax.swing.JComponent;
import javax.swing.JPanel;
public class PropertyDescriptorTest
{
public static void main(String[] args)
{
JComponent c = new JPanel();
String name = "name";
long start = System.currentTimeMillis();
try
{
for (int i=0; i<1000; i++)
new PropertyDescriptor(name, c.getClass()).getReadMethod().invoke(c);
}
catch (Exception e)
{
e.printStackTrace();
}
long stop = System.currentTimeMillis();
System.err.println(stop-start);
}
}
---------- END SOURCE ----------
- backported by
-
JDK-2225647 PropertyDescriptor Performance Slow
-
- Resolved
-
- duplicates
-
JDK-7184799 Introspector.getBeanInfo() performance regressed substantially with JDK 7
-
- Closed
-
- relates to
-
JDK-7187618 PropertyDescriptor Performance Slow (continue)
-
- Closed
-