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

Expensive multi-core choke point when any graphics objects are created

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 8, 9
    • client-libs
    • 2d
    • b23
    • generic
    • generic

      When the graphics object is created for BufferedImage it will call:

          GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
          return env.createGraphics(this);

      The problem is that getLocalGraphicsEnvironment() is a static and synchronized method. So even if the application will draw to the different BufferedImages using different threads, it will be blocked in this method.

            serb Sergey Bylokhov
            serb Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: