Modify

Opened 4 years ago

Closed 4 years ago

#18624 closed defect (fixed)

Download parent ways/relations downloads way nodes twice

Reported by: GerdP Owned by: team
Priority: normal Milestone: 20.01
Component: Core Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Create new edit layer
  2. Download node 1707790074 without refereres
  3. Select the node and press Ctrl+Alt+D to "download parent ways/relations"

What is the expected result?

The following log messages about downloads:

2020-01-26 11:34:36.560 INFO: GET https://api.openstreetmap.org/api/0.6/node/1707790074/ways -> HTTP_1 200 (565 B)
2020-01-26 11:34:36.563 INFO: Way 35359130 with 4 nodes is incomplete because at least one node was missing in the loaded data.
2020-01-26 11:34:36.564 INFO: Way 39276020 with 3 nodes is incomplete because at least one node was missing in the loaded data.
2020-01-26 11:34:36.565 INFO: Way 158615405 with 8 nodes is incomplete because at least one node was missing in the loaded data.
2020-01-26 11:34:36.652 INFO: GET https://api.openstreetmap.org/api/0.6/node/1707790074/relations -> HTTP_1 200 (189 B)
2020-01-26 11:34:36.722 INFO: GET https://api.openstreetmap.org/api/0.6/way/35359130/full -> HTTP_1 200
2020-01-26 11:34:36.792 INFO: GET https://api.openstreetmap.org/api/0.6/way/39276020/full -> HTTP_1 200
2020-01-26 11:34:36.857 INFO: GET https://api.openstreetmap.org/api/0.6/way/158615405/full -> HTTP_1 200

What happens instead?

One more useless download (ways were downloaded with the /full suffix, so there should be no incomplete nodes):

2020-01-26 11:34:36.929 INFO: GET https://api.openstreetmap.org/api/0.6/nodes?nodes=21563481,3972566713,21590698,21392272,21392273,21563489,4719617974,4822267109,4822267110,1707790096,1707790085,4822267107 -> HTTP_1 200

Please provide any additional information below. Attach a screenshot if possible.

I am working on a patch. Maybe also for #12303.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-01-02 22:34:59 +0100 (Thu, 02 Jan 2020)
Build-Date:2020-01-02 21:52:31
Revision:15628
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15628 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1903 (18362)
Memory Usage: 941 MB / 4551 MB (623 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc, -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_20200126_112549.jfr]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (35250)
+ PolygonCutOut (v0.7)
+ apache-commons (35092)
+ buildings_tools (35248)
+ continuosDownload (91)
+ ejml (35122)
+ geotools (35169)
+ jaxb (35092)
+ jts (35122)
+ merge-overlap (35248)
+ o5m (35248)
+ opendata (35280)
+ pbf (35248)
+ poly (35248)
+ reverter (35248)
+ undelete (35248)
+ utilsplugin2 (35248)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (2)

18624.patch (979 bytes ) - added by GerdP 4 years ago.
download only incomplete nodes
18624.2.patch (5.9 KB ) - added by GerdP 4 years ago.

Download all attachments as: .zip

Change History (6)

by GerdP, 4 years ago

Attachment: 18624.patch added

download only incomplete nodes

comment:1 by GerdP, 4 years ago

I don't yet understand why we have these two lines in

            // Don't retrieve any nodes we've already grabbed
            nodes.removeAll(targetLayer.data.getNodes());

The effect is that the freshly downloaded nodes are not used to update the existing ones. Was introduced in #5293 but probably isn't useful anymore.

by GerdP, 4 years ago

Attachment: 18624.2.patch added

comment:2 by GerdP, 4 years ago

18624.2.patch simplifies the code and improves performance a lot when retrieving the parents for many nodes, e.g. all nodes of a way.
Does not yet use Overpass API.

comment:3 by GerdP, 4 years ago

In 15787/josm:

see #18624: Download parent ways/relations downloads way nodes twice (or more)
Improve performance, esp. when multiple nodes of the same way are selected

  • DownloadReferrersTask: download all incomplete nodes of all parent ways with one MultiFetchServerObjectReader instead of repeating this step for each parent way. Saves lots of FULL api calls for the parent ways (/full)
  • updated parent way nodes are recognized
  • DownloadPrimitivesWithReferrersTask creates only one DownloadReferrersTask for all primitives to profit from the above changes

comment:4 by GerdP, 4 years ago

Milestone: 20.01
Resolution: fixed
Status: newclosed

forgot to close this, problem is fixed, possible usage of overpass api see #12303

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.