frozen editor while panning or zooming of the map
Stephan Knauss
osm at stephans-server.de
Wed Sep 12 06:44:31 UTC 2018
Hello,
On 11.09.2018 23:06, Stephan Knauss wrote:
> http://downloads.osm-tools.org/josm-custom-2018-09-11(7).zip
Another question regarding the blocked painting.
If I get the stack right, we are inside the painting loop in
org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.drawInViewArea(Graphics2D,
MapView, ProjectionBounds) AbstractTileSourceLayer.java:1514
What is the reason that here tiles are loaded and not simply painted? If
tiles are available, they can be painted. If tiles are due to be loaded
this is something to expected to take longer, so why not offloading this
to a later point in time?
Or maybe it was intended to do so? The (before mentioned)
JCSCachedTileLoaderJob.submit() might do this. But according to the
profiler this method then takes away 71% of the time in the painting
loop. In my case multiple seconds.
Later on a lot of time is spent here:
HostLimitQueue.java:143 <...>
java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(int)
which seems to be part of a "trick" to exploit a side effect of the
method. Looks like this was implemented by wiktorn.
Shall I create a ticket with the details up to now to better track it?
The following snippet os a call stack of what I believe a single call.
"Name","Level"
"AWT-EventQueue-0 Runnable CPU usage on sample: 234ms","1"
"java.util.concurrent.ThreadPoolExecutor.setCorePoolSize(int)","2"
"org.openstreetmap.josm.data.cache.HostLimitQueue.offer(Runnable)
HostLimitQueue.java:143","2"
"org.openstreetmap.josm.data.cache.HostLimitQueue.offer(Object)
HostLimitQueue.java:30","2"
"java.util.concurrent.ThreadPoolExecutor.execute(Runnable)","2"
"org.openstreetmap.josm.data.cache.JCSCachedTileLoaderJob.submit(ICachedLoaderListener,
boolean) JCSCachedTileLoaderJob.java:168","2"
"org.openstreetmap.josm.data.imagery.TMSCachedTileLoaderJob.submit(boolean)
TMSCachedTileLoaderJob.java:150","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.loadTile(Tile,
boolean) AbstractTileSourceLayer.java:891","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.access$100(AbstractTileSourceLayer,
Tile, boolean) AbstractTileSourceLayer.java:141","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer$TileSet.loadAllTiles(boolean)
AbstractTileSourceLayer.java:1272","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer$TileSet.access$1000(AbstractTileSourceLayer$TileSet,
boolean) AbstractTileSourceLayer.java:1183","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.drawInViewArea(Graphics2D,
MapView, ProjectionBounds) AbstractTileSourceLayer.java:1514","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer.access$2700(AbstractTileSourceLayer,
Graphics2D, MapView, ProjectionBounds) AbstractTileSourceLayer.java:141","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer$TileSourcePainter.doPaint(MapViewGraphics)
AbstractTileSourceLayer.java:1892","2"
"org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer$TileSourcePainter.paint(MapViewGraphics)
AbstractTileSourceLayer.java:1886","2"
"org.openstreetmap.josm.gui.MapView.paintLayer(Layer, Graphics2D)
MapView.java:468","2"
"org.openstreetmap.josm.gui.MapView.drawMapContent(Graphics2D)
MapView.java:583","2"
"org.openstreetmap.josm.gui.MapView.paint(Graphics) MapView.java:490","2"
"java.awt.EventDispatchThread.run()","2"
More information about the josm-dev
mailing list