Ignore:
Timestamp:
11.01.2009 20:11:07 (3 years ago)
Author:
ulfl
Message:

mappaint major performance improvements:

  • cache mappaint style and isArea information in OsmPrimitive
  • don't call alreadyDrawn.contains() - seems that ends up in n2 searches
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

    r1214 r1254  
    1919import org.openstreetmap.josm.tools.DateParser; 
    2020import org.openstreetmap.josm.Main; 
     21import org.openstreetmap.josm.gui.mappaint.ElemStyle; 
    2122 
    2223 
     
    139140    private static Collection<String> directionKeys = null; 
    140141 
     142         
     143    /* mappaint style cache */ 
     144    public ElemStyle mappaintStyle = null; 
     145    public boolean isMappaintArea = false; 
     146         
    141147    /** 
    142148     * Implementation of the visitor scheme. Subclasses have to call the correct 
     
    214220        checkTagged(); 
    215221        checkDirectionTagged(); 
     222        mappaintStyle = null; 
    216223    } 
    217224    /** 
     
    226233        checkTagged(); 
    227234        checkDirectionTagged(); 
     235        mappaintStyle = null; 
    228236    } 
    229237 
     
    262270        tagged = osm.tagged; 
    263271        incomplete = osm.incomplete; 
     272        mappaintStyle = null; 
    264273    } 
    265274 
Note: See TracChangeset for help on using the changeset viewer.