Ignore:
Timestamp:
09.09.2009 19:38:48 (3 years ago)
Author:
Gubaer
Message:

see #3393: loooong delay when using presets with a large osm file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionCache.java

    r2048 r2088  
    33import java.util.ArrayList; 
    44import java.util.Collection; 
    5 import java.util.Collections; 
    65import java.util.HashMap; 
    76import java.util.HashSet; 
    8 import java.util.LinkedList; 
    97import java.util.List; 
    108import java.util.Set; 
     
    7472    /** the cached list of member roles */ 
    7573    private  Set<String> roleCache; 
    76     /** the cache of all tag values */ 
    77     private  Set<String> allTagValues; 
    7874    /**  the layer this cache is built for */ 
    7975    private OsmDataLayer layer; 
     
    8682        tagCache = new HashMap<String, Set<String>>(); 
    8783        roleCache = new HashSet<String>(); 
    88         allTagValues = new HashSet<String>(); 
    8984        this.layer = layer; 
    9085    } 
     
    114109        cacheKey(key); 
    115110        tagCache.get(key).add(value); 
    116         allTagValues.add(value); 
    117111    } 
    118112 
     
    236230        list.add(tagCache.keySet(), AutoCompletionItemPritority.IS_IN_DATASET); 
    237231    } 
    238  
    239  
    240     /** 
    241      * Populates the an {@see AutoCompletionList} with the currently cached 
    242      * tag values 
    243      * 
    244      * @param list the list to populate 
    245      * @param append true to add the keys to the list; false, to replace the keys 
    246      * in the list by the keys in the cache 
    247      */ 
    248     public void populateWithValues(AutoCompletionList list, boolean append) { 
    249         if (!append) { 
    250             list.clear(); 
    251         } 
    252         list.add(this.allTagValues, AutoCompletionItemPritority.IS_IN_DATASET); 
    253     } 
    254232} 
Note: See TracChangeset for help on using the changeset viewer.