Modify

Opened 7 years ago

Closed 5 years ago

#13890 closed enhancement (fixed)

"Upload selection" slow with deleted objects (too many API calls)

Reported by: Adrian Owned by: Don-vip
Priority: normal Milestone: 19.10
Component: Core Version: tested
Keywords: template_report performance upload selection Cc:

Description

What steps will reproduce the problem?

  1. Load some OSM data containing buildings.
  2. Delete between five and ten buildings with a total of about 50 nodes.
  3. Upload the changes, wait until JOSM has done its checks, then cancel the upload.

What is the expected result?

'Checking parents for deleted objects' takes less than 30 seconds.

What happens instead?

'Checking parents for deleted objects' took four minutes. See the attached log of messages at the command line. The log contains about 3000 lines. (I deleted those buildings because they have been demolished.)

Is it possible to improve the performance of JOSM when deleting please?

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

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2016-09-06 00:16:07 +0200 (Tue, 06 Sep 2016)
Build-Date:2016-09-05 22:21:00
Revision:10966
Relative:URL: ^/trunk

Identification: JOSM/1.5 (10966 en) Mac OS X 10.9.5
Memory Usage: 475 MB / 3641 MB (282 MB allocated, but free)
Java version: 1.8.0_102-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 725375437 1920x1200
Maximum Screen Size: 1920x1200

Plugins:
+ ImportImagePlugin (32699)
+ InfoMode (32789)
+ PicLayer (32796)
+ apache-commons (32699)
+ cadastre-fr (32796)
+ download_along (32946)
+ editgpx (32699)
+ ejml (32680)
+ geotools (32813)
+ imagery_offset_db (32796)
+ jts (32699)
+ log4j (32699)
+ measurement (32936)
+ opendata (32898)
+ poly (32699)
+ reverter (32796)
+ turnrestrictions (32796)
+ undelete (32699)
+ utilsplugin2 (32815)
+ waydownloader (32699)

Last errors/warnings:
- W: Update plugins - org.openstreetmap.josm.plugins.PluginHandler$UpdatePluginsMessagePanel[,0,0,0x0,invalid,layout=java.awt.GridBagLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]

Attachments (1)

20161027_log.txt.zip (7.6 KB ) - added by Adrian 7 years ago.
Log of messages at the command line (zipped so it would not be rejected as spam)

Download all attachments as: .zip

Change History (6)

by Adrian, 7 years ago

Attachment: 20161027_log.txt.zip added

Log of messages at the command line (zipped so it would not be rejected as spam)

comment:1 by Adrian, 7 years ago

It turns out that this only happens if you use "Upload selection". So the above steps will not reproduce the problem. These are the steps needed:

  1. Load some OSM data containing buildings.
  2. Delete between five and ten buildings with a total of about 50 nodes.
  3. Modify an object and leave it selected.
  4. Choose "Upload selection" and when asked, choose to upload all the deleted objects.
  5. Wait until JOSM has done its checks, then cancel the upload.

Therefore the workaround for this problem is to plan your editing, in such a way that you avoid using "Upload selection" if you are deleting any objects.

I have now analysed the log I attached. It shows that JOSM made 1140 calls to the OSM API during the four minutes. That is about twenty calls per object deleted. In my opinion, such a load on the OSM servers is undesirable. The analysis also shows that for one of the deleted nodes, JOSM made 19 identical calls to the API. For one of the deleted ways, JOSM made 191 identical calls to the API. I suspect either

  1. there is a bug, or
  2. the algorithm is not very efficient.

I will open a separate ticket #14021 for a patch to warn about slow uploads.

Last edited 5 years ago by Don-vip (previous) (diff)

comment:2 by Don-vip, 5 years ago

Keywords: upload selection added

comment:3 by Don-vip, 5 years ago

Summary: JOSM performance slow when deleting"Upload selection" slow with deleted objects (too many API calls)

comment:4 by Don-vip, 5 years ago

Milestone: 19.10
Owner: changed from team to Don-vip
Status: newassigned

comment:5 by Don-vip, 5 years ago

Resolution: fixed
Status: assignedclosed

In 15426/josm:

fix #13890 - improve performance of "Upload selection" checks

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
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.