Ticket #11386: fix_out_of_memory.patch

File fix_out_of_memory.patch, 961 bytes (added by wiktorn, 11 years ago)
  • src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java

    diff --git src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java
    index d7cf58b..3fd09b4 100644
    public class TMSCachedTileLoader implements TileLoader, CachedTileLoader, TileCa  
    4646     */
    4747    public TMSCachedTileLoader(TileLoaderListener listener, String name, int connectTimeout, int readTimeout, Map<String, String> headers, String cacheDir) throws IOException {
    4848        this.cache = JCSCacheManager.getCache(name,
    49                 1000, // use JCS memory cache instead of MemoryTileCache
     49                200, // use fairly small memory cache, as cached objects are quite big, as they contain BufferedImages
    5050                MAX_OBJECTS_ON_DISK.get(),
    5151                cacheDir);
    5252        this.connectTimeout = connectTimeout;