Modify

Opened 13 years ago

Closed 12 years ago

#5293 closed defect (fixed)

[patch] Download parent ways/relations unnecessarily downloads nodes repeatedly

Reported by: anonymous Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

When selecting sevaral nodes of the same way and then "download parent ways/relations" JOSM downloads the same nodes many times.

What appears to happen is that JOSM for each node first (correctly) downloads all ways referencing that node. Then it goes on to download all nodes of the ways returned. However if you are trying to find all connected ways to another way and thus select all nodes of that way, josm will download all nodes in that way however many times as there are nodes in that way. So if e.g. you are trying to find connected ways/nodes in a 600 node way (in order to delete it and its nodes without conflicts), JOSM will download those 600 nodes 600 times instead of just downloading them once.

Attachments (1)

ticket5293.patch (2.4 KB) - added by lordsutch 12 years ago.
Patch for duplicate downloads

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by lordsutch

Attachment: ticket5293.patch added

Patch for duplicate downloads

comment:1 Changed 12 years ago by lordsutch

The attached patch ensures that nodes are only downloaded once, which should reduce the server load of the Download Ways/Relations... command substantially. (Server-side support for relations and ways referenced by a list of nodes would make this even more efficient.)

comment:2 Changed 12 years ago by stoecker

Summary: Download parent ways/relations unnecessarily downloads nodes repeatedly[patch] Download parent ways/relations unnecessarily downloads nodes repeatedly

comment:3 Changed 12 years ago by bastiK

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

Do you mean targetLayer.data instead of parents?

comment:4 Changed 12 years ago by lordsutch

Do you mean targetLayer.data instead of parents?

Sure; that probably would be an even bigger improvement. (This is my first real hacking on JOSM, so I wasn't sure what layers were available in the code beyond those already used elsewhere in the .java file.)

comment:5 Changed 12 years ago by bastiK

Resolution: fixed
Status: newclosed

In [4094/josm]:

applied #5293 (patch by lordsutch) - Fix: Download parent ways/relations unnecessarily downloads nodes repeatedly

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.