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

BufferedImage creates useless Hashtable

XMLWordPrintable

    • 2d
    • 5.0
    • 5.0
    • b33
    • generic, x86
    • generic, linux_redhat_9.0

      BufferedImage has field properties that can be initialized to null, but (starting from the JDK1.5) it is needlessly filled with new instance of Hashtable on first call to getProperty. We use BufferedImages for icons so we have hundreds of them on the heap in NetBeans. Each such icon wastes nearly 100B on empty unused Hashtable.

      Very similar situation is with X11CachingSurfaceManager (that is attached to each instance of BufferedImage), where most of instances (~90%) have the accelSurfaces Hashtable empty.

      That is together nearly 200B wasted per each 16x16 pixels icon.
      ###@###.### 2005-03-08 10:20:00 GMT

            tdv Dmitri Trembovetski (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: