Modify

Opened 6 weeks ago

Closed 6 weeks ago

Last modified 6 weeks ago

#16938 closed defect (fixed)

[Patch] Poor GUI performance when data contains ways with many nodes

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

Description

What steps will reproduce the problem?

  1. Load sample file which is an extract of coastlines
  2. execute a search for (type:way "natural"="coastline" -closed)
  3. Zoom in/out or pan close to ways with many nodes, e.g. way 409381644

What is the expected result?

Quick reaction

What happens instead?

Sometimes GUI hangs for many seconds before reacting

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

I noticed that while trying to find errors in the coastline. I used VisualVM to track down where the problem occurs. It always showed NavigatableComponent.getNearestWaySegments().
I think I found one problem addressed by the attached small patch:
The searchloop should only search for the 2 nodes in the current way segment, not for all nodes of the way.

Build-Date:2018-11-02 08:35:18
Revision:14401
Is-Local-Build:true

Identification: JOSM/1.5 (14401 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 2579 MB / 3641 MB (1434 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:55052, -ea, -Dfile.encoding=UTF-8]
Program arguments: [--debug]
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (34535)
+ apache-commons (34506)
+ buildings_tools (34572)
+ download_along (34503)
+ ejml (34389)
+ geotools (34513)
+ jaxb (34506)
+ jts (34524)
+ measurement (34529)
+ merge-overlap (34664)
+ o5m (34405)
+ opendata (34698)
+ pbf (34576)
+ poly (34546)
+ reverter (34552)
+ undelete (34568)
+ utilsplugin2 (34506)

Last errors/warnings:
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: Unable to delete archived backup file <josm.pref>\autosave\deleted_layers\63240038.osm.pbf_20181102_081222383.osm
- W: Unsaved changes - <html>The relation has been changed.<br><br>Do you want to save your changes?</html>
- E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<The maximum bbox size is 0.25, and your request was too large. Either request a smaller area, or use planet.osm>
- E: Bad Request - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
- E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- E: Bad Request - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
- E: org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>
- E: Bad Request - org.openstreetmap.josm.gui.widgets.HtmlPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]

Attachments (2)

63240042.osm.pbf (2.7 MB) - added by GerdP 6 weeks ago.
16938.patch (1.0 KB) - added by GerdP 6 weeks ago.

Change History (9)

Changed 6 weeks ago by GerdP

Attachment: 63240042.osm.pbf added

Changed 6 weeks ago by GerdP

Attachment: 16938.patch added

comment:1 Changed 6 weeks ago by Don-vip

Keywords: performance added

comment:2 Changed 6 weeks ago by Don-vip

Milestone: 18.11

Looks fine. Good catch!

comment:3 Changed 6 weeks ago by GerdP

Thanks for the quick feedback. If you don't mind please check reg. CheckStyle complains and commit it, the Checkstyle plugin doesn't work in my current Eclipse installation:
"Checkstyle execution failed due to an internal error. Please check the error log for details.."
I did not find an explanation in the log...

comment:4 Changed 6 weeks ago by Don-vip

Using Checkstyle on Eclipse requires to add the custom Checkstyle JOSM plugin (as we have a custom check).
You can find the Eclipse project in browser/josm/trunk/tools/checkstyle. I must document it at DevelopersGuide/Compiling. Do you know how to deploy an Eclipse plugin from source?

comment:5 Changed 6 weeks ago by GerdP

Never tried that. Will try later, today I want to finish the coastline checks...

comment:6 Changed 6 weeks ago by Don-vip

Resolution: fixed
Status: newclosed

In 14402/josm:

fix #16938 - improve performance when data contains ways with many nodes (patch by GerdP, modified)

comment:7 Changed 6 weeks ago by GerdP

@Don-Vip: I tried to install the plugin but I have no idea where to start. Google did not help me so far. I use this Eclipse version:
Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500

So yes, would be good to find some docu in the dev guide.

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.