Index: trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 4620)
+++ trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 4621)
@@ -51,4 +51,5 @@
 import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
 import org.openstreetmap.josm.gui.layer.markerlayer.PlayHeadMarker;
+import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
 import org.openstreetmap.josm.tools.AudioPlayer;
 import org.openstreetmap.josm.tools.BugReportExceptionHandler;
@@ -842,4 +843,5 @@
         Main.pref.removePreferenceChangeListener(this);
         DataSet.removeSelectionListener(repaintSelectionChangedListener);
+        MapPaintStyles.getStyles().clearMultipolygonsCache(this);
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 4620)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyles.java	(revision 4621)
@@ -6,6 +6,8 @@
 import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Map.Entry;
 
@@ -28,8 +30,11 @@
     private boolean defaultNodes, defaultLines;
     private int defaultNodesIdx, defaultLinesIdx;
+    
+    private final Map<NavigatableComponent, Map<Relation, Multipolygon>> multipolygonsCache;
 
     public ElemStyles()
     {
         styleSources = new ArrayList<StyleSource>();
+        multipolygonsCache = new HashMap<NavigatableComponent, Map<Relation,Multipolygon>>();
     }
 
@@ -116,4 +121,18 @@
     }
 
+    private final Multipolygon getCachedMultipolygon(NavigatableComponent nc, Relation r) {
+        Multipolygon multipolygon = null;
+        Map<Relation, Multipolygon> map = multipolygonsCache.get(nc);
+        if (map == null) {
+            multipolygonsCache.put(nc, map = new HashMap<Relation, Multipolygon>());
+        }
+        multipolygon = map.get(r);
+        if (multipolygon == null) {
+            map.put(r, multipolygon = new Multipolygon(nc));
+            multipolygon.load(r);
+        }
+        return multipolygon;
+    }
+    
     /**
      * Create the list of styles and its valid scale range for one primitive.
@@ -160,6 +179,5 @@
                     continue;
                 }
-                Multipolygon multipolygon = new Multipolygon(nc);
-                multipolygon.load(r);
+                Multipolygon multipolygon = getCachedMultipolygon(nc, r);
 
                 if (multipolygon.getOuterWays().contains(osm)) {
@@ -226,6 +244,5 @@
                     continue;
                 }
-                Multipolygon multipolygon = new Multipolygon(nc);
-                multipolygon.load(ref);
+                final Multipolygon multipolygon = getCachedMultipolygon(nc, ref);
 
                 if (multipolygon.getInnerWays().contains(osm)) {
@@ -413,3 +430,6 @@
     }
 
+    public void clearMultipolygonsCache(NavigatableComponent nc) {
+        multipolygonsCache.remove(nc);
+    }
 }
