Index: ImageProvider.java
===================================================================
--- ImageProvider.java	(revision 14207)
+++ ImageProvider.java	(working copy)
@@ -306,6 +306,7 @@
      * The icon cache
      */
     private static final Map<String, ImageResource> cache = new HashMap<>();
+    private static final Map<String, ImageIcon> typeCache = new HashMap<>();
 
     /**
      * Caches the image data for rotated versions of the same image.
@@ -836,6 +837,9 @@
         synchronized (cache) {
             cache.clear();
         }
+        synchronized (typeCache) {
+            typeCache.clear();
+        }
     }
 
     /**
@@ -1473,7 +1477,15 @@
      */
     public static ImageIcon get(OsmPrimitiveType type) {
         CheckParameterUtil.ensureParameterNotNull(type, "type");
-        return get("data", type.getAPIName());
+        synchronized (typeCache) {
+            ImageIcon ii  = typeCache.get(type.getAPIName());
+            if (ii == null) {
+                ii = get("data", type.getAPIName());
+                if (ii != null)
+                    typeCache.put(type.getAPIName(), ii);
+            }
+            return ii;
+        }
     }
 
     /**
