Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7122740

PropertyDescriptor Performance Slow

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b23
    • CPU:
      x86
    • OS:
      windows_7
    • Verification:
      Verified

      Backports

        Description

        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 ----------

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                malenkov Sergey Malenkov (Inactive)
                Reporter:
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: