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

MetalBumps initialization code does too many setColors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.2.0
    • 1.2.0
    • client-libs
    • None
    • 1.2beta4
    • x86
    • windows_95, windows_nt
    • Not verified


      The code in the Metal look and feel that initializes the
      MetalBumps has an amusing performance glitch.

      It does a graphics.setColor on each pixel it draws. On JDK1.2
      this causes a pretty steep performance penalty as it causes
      cached state to be discarded in the underlying BufferedImageGraphics2D
      object.

      It turns out that on my 150 MHz Pentium we were spending 5 seconds
      during Swing startup (30% of the total) in the MetalBumps code.

      Changing the MetalBumps code to avoid doing such frequent setColors
      and also fixing a caching bug in BufferedImageGraphics2D (#4146832)
      reduced Swing starup time by 5 seconds. ha!!!!

      See the proposed fix section for my changes.

      graham.hamilton@Eng 1998-06-08

            stewilso Steve Wilson (Inactive)
            ghamiltosunw Graham Hamilton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: