Opened 6 years ago
Last modified 6 years ago
#16760 new defect
Event loop stuck on ForkJoinPool
Reported by: | stephankn | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | performance | Cc: | wiktorn |
Description
In ticket #16734 the GUI was not responsive for up to 10s.
I reproduced it again and attached a YourKit snapshot here.
Use-Case was a new empty data layer and one imagery layer visible. I am in drawing mode and have a node places. Line follows the cursor. Then zooming the map. GUI freezes für multiple seconds, often shortly unblock to freeze then again.
Monitor usage view of profiler indicates AWT being blocked here for 2657ms, with 1359ms of blocking time on
java.util.stream.ForEackOps$ForEachTask by
org.openstreetmap.josm.gui.layer.AbstractTileSourceLayer$TileSet.visitTiles(Consumer, Consumer) AbstractTileSourceLayer.java:1297
and 1104ms of blocking time on monitor
org.openstreetmap.josm.data.osm.visitor.paint.ComputeStyleListWorker called by
org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer.paintWithLock(OsmData, boolean, RenderBenchmarkCollector, BBox) StyledMapRenderer.java:1645
Both seem to be ForkJoinPool instances. I'm not certain whether they are independent or shared. Someone deeper into the internals might want to comment on this one.
Interesting reading on Stack Overflow as others seem to have faces similar issues before:
https://stackoverflow.com/questions/21163108/custom-thread-pool-in-java-8-parallel-stream/
Attachments (1)
Change History (3)
by , 6 years ago
Attachment: | josm-custom-2018-09-20(3).zip added |
---|
comment:1 by , 6 years ago
Cc: | added |
---|---|
Keywords: | performance added |
comment:2 by , 6 years ago
@stephankn:
Use-Case was a new empty data layer and one imagery layer visible.
Can you elaborate what you mean that one layer was visible? Did you have only one layer added, only one marked as visible (eye icon on layer list) or top layer was covering all the layers below? How many imagery layers you had in total?
Maybe related to how we create ForkJoinPool: