Changeset 9819 in josm for trunk/src/org


Ignore:
Timestamp:
2016-02-17T23:46:55+01:00 (9 years ago)
Author:
wiktorn
Message:

Add debug messages with estimates of cache size.

See: #12050

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r9731 r9819  
    681681        int visibileTiles = (int) (Math.ceil((double) height / tileSize + 1) * Math.ceil((double) width / tileSize + 1));
    682682        // add 10% for tiles from different zoom levels
    683         return (int) Math.ceil(
     683        int ret = (int) Math.ceil(
    684684                Math.pow(2d, ZOOM_OFFSET.get()) * visibileTiles // use offset to decide, how many tiles are visible
    685685                * 2);
     686        Main.info("AbstractTileSourceLayer: estimated visible tiles: {0}, estimated cache size: {1}", visibileTiles, ret);
     687        return ret;
    686688    }
    687689
Note: See TracChangeset for help on using the changeset viewer.