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

JDK 1.2 graphics performance too slow, drawing to an offscreen Image

    XMLWordPrintable

Details

    • 2d
    • 1.2fcs
    • x86
    • windows_95, windows_nt
    • Not verified

    Description

      The seriousness of the graphics performance issue cannot be overstated.
      I have tested ImageGraphTest, which draws to an offscreen Image and then
      draws that image to a window on both jdk1.1.4 and jdk1.2beta. The
      results (in seconds, as timed by Java and displayed by the program) are
      as follows on my machine, which is a 200 MHz Pentium Pro with two 4byte
      Matrox Millenium graphics cards installed:

                                   256 colors true color
                               jdk1.1.4 jdk1.2beta2 jdk1.1.4 jdk1.2beta2
      Clear image bitmap time: 0.04 0.19 0.14 0.18
      Draw vectors to image time: 4.27 49.7 4.24 49.8
      Blit image to window time: 0.64 2.05 2.17 2.56

      This same 10x slowdown also manifests itself in very sluggish
      performance of Swing on JDK1.2, which I am certain is because Swing
      draws to offscreen images as well. Also, when running in 256 color mode,
      the quality of the output is unacceptable, most likely because of the
      translation from the true color offscreen buffer to the color palette of
      the 256 color mode.

      I don't think I'm exaggerating when I say that this poor performance
      threatens the viability of Java as an alternative to building pure
      Windows applications. Any vendor who uses Java for a commercial product
      will be simply blown out of the water by vendors who instead build
      Windows applications.

      Test Code too large to save within bug report, please see test case located
      in dirtectory:
        /net/galapago.east/files/test/bentley/graphTest_critical/

      Run the example by compiling it:

      javac ImageGraphTest.java

      and then running it, giving it the name of the graphics log file as
      input:

      java ImageGraphTest map.log

      It takes a while to read in the log file, and you don't see any activity
      except for disk activity during that period.

      The performance of the example in JDK 1.2 needs to get within a few
      percentage points of the performance of JDK 1.1.4 for it to be
      acceptable.

      Attachments

        Issue Links

          Activity

            People

              flar Jim Graham
              jbenoit Jonathan Benoit (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: