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

Poor performance in predefined pattern drawing

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
      None
    • Subcomponent:
      2d
    • CPU:
      sparc
    • OS:
      solaris

      Description

      Customer built the application and he complained that 100,000 filled pattern take long time to draw compared to hollow retatangle. In comparison with xlib, java is too slow and is not competitive with other graphic packages.

      Customer provided Java application - magma.jar to demostrate this performance issue.

      In JDK 1.3.1 under solaris 8.

      % java -version
      Java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

      % java xvf magma.jar
      Exception in thread "main" java.lang.NoClassDefFoundError: xvf
      habu% jar xvf magma.jar
        created: META-INF/
      extracted: META-INF/MANIFEST.MF
        created: Console2/
      extracted: JFrame1$SymWindow.class
      extracted: JFrame1.class
      extracted: JFrame1.java
      extracted: MyPanel.class
      extracted: MyPanel.java
      extracted: MyPanel.java.bak
      extracted: PatternHandler$PatternEntry.class
      extracted: PatternHandler$TextureEntry.class
      extracted: PatternHandler.class
      extracted: PatternHandler.java
        created: pattern/

      % java JFrame1

      Rect Count: 100000
      Hollow Rect: 1210
      Predefined pattern only 80808
      Predefined Pattern and Color: 77054

      Rect Count: 100000
      Hollow Rect: 1567
      Predefined pattern only 77611
      Predefined Pattern and Color: 61761

      Rect Count: 100000
      Hollow Rect: 231
      Predefined pattern only 4744
      Predefined Pattern and Color: 5194

      Rect Count: 100000
      Hollow Rect: 387
      Predefined pattern only 2412
      Predefined Pattern and Color: 1734


      Rectangle count 100,000 would take a lot less time in millisecond compared to predefined pattern. Customer requests to speed up to draw the filled pattern retangle.

      The test was also performed under JDK 1.2.2_08 and SDK beta 1.4. They all show the same problem. The sample applciation running in NT plaform is much faster. However it is still slow in drawing predefined pattern retangle.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tdv Dmitri Trembovetski (Inactive)
              Reporter:
              yujchen Yujing Chen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: