Changeset 31609 in osm


Ignore:
Timestamp:
2015-10-11T22:31:46+02:00 (9 years ago)
Author:
wiktorn
Message:

All access to MemoryTIleCache will move cached object to the front of LRU queue

When only loaded tiles are moved to the front of the queue of LRU cache, when working
near the cache size limit, new objects are fairly quickly removed from the caches leading
to "flickering" of the tiles and high CPU usage.

Changing this to simple LRU policy removes the effect

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java

    r31606 r31609  
    6464        if (entry == null)
    6565            return null;
    66         // We don't care about placeholder tiles and hourglass image tiles, the
    67         // important tiles are the loaded ones
    68         if (entry.tile.isLoaded())
    69             lruTiles.moveElementToFirstPos(entry);
     66        lruTiles.moveElementToFirstPos(entry);
    7067        return entry.tile;
    7168    }
Note: See TracChangeset for help on using the changeset viewer.