#11821 closed enhancement (fixed)
JOSM freezes while Bing attribution data is loaded
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 15.09 |
Component: | Core imagery | Version: | |
Keywords: | bing | Cc: | wiktorn |
Description
With a very slow/saturated network, after enabling the Bing layer it's possible to see that JOSM freezes (while it's waiting to load Bing attribution data).
In console it's possible to see:
Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. AVISO: Could not connect to Bing API. Will retry in 1 seconds. Bing: attribution data is not yet loaded. AVISO: Could not connect to Bing API. Will retry in 2 seconds. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. AVISO: Could not connect to Bing API. Will retry in 4 seconds. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. AVISO: Could not connect to Bing API. Will retry in 8 seconds. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded. Bing: attribution data is not yet loaded.
JOSM:
Repository Root: http://josm.openstreetmap.de/svn Build-Date: 2015-08-29 01:32:08 Last Changed Author: Klumbumbus Revision: 8701 Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Relative URL: ^/trunk URL: http://josm.openstreetmap.de/svn/trunk Last Changed Date: 2015-08-28 22:43:26 +0200 (Fri, 28 Aug 2015) Last Changed Rev: 8701 Identification: JOSM/1.5 (8701 pt_BR) Linux Debian GNU/Linux unstable (sid) Memory Usage: 248 MB / 4029 MB (101 MB allocated, but free) Java version: 1.7.0_79, Oracle Corporation, OpenJDK 64-Bit Server VM Java package: openjdk-7-jre:amd64-7u79-2.5.6-1 VM arguments: [-Dawt.useSystemAAFontSettings=on] Plugins: - AddrInterpolation (31241) - Create_grid_of_ways (31241) - FastDraw (31265) - FixAddresses (31241) - OpeningHoursEditor (31241) - PicLayer (31241) - SimplifyArea (31241) - buildings_tools (31361) - download_along (31241) - editgpx (31241) - geotools (31126) - graphview (31241) - jts (31126) - measurement (31289) - merge-overlap (31241) - opendata (31241) - pdfimport (31241) - poly (31241) - reverter (31241) - tagging-preset-tester (31241) - todo (29154) - turnrestrictions (31241) - undelete (31241) - utilsplugin2 (31463)
Is it possible to download the attribution data (and related stuff) asynchronously, to avoid JOSM freezing while the imagery is loading?
Probably the slow network can be simulated with https://github.com/mariusae/trickle
Attachments (0)
Change History (5)
comment:1 by , 9 years ago
Keywords: | bing added |
---|
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Things will become easier, once we switch to Java 8 (#11390): https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html
comment:5 by , 9 years ago
Milestone: | → 15.09 |
---|
Bing attribution is already been downloaded in background. The problem is, that each time, we check, if attribution is loaded, we wait for 1 second, until we fail. And for one second, the main JOSM thread (EDT) is blocked.
We can wait 10 miliseconds instead, but this will result in situation, that usually, when you add Bing layer, all tiles will fail to load, as attribution was not yet loaded. We can't just retry the download on failure, as this would kill both JOSM and tile servers. This would then require user to manually load all tiles.
What we can do, to keep the good user expierence, is to add a Callable, to be called, when attribution is loaded, that will call reload of all tiles of the Bing layer. Though I need to think about good implementation pattern for this