Modify

Opened 9 years ago

Last modified 5 years ago

#10779 new defect

undelete plugin hangs with a lot of objects in "Object ID" field

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

Description

Insert a lot of objects to undelete (like the 7396 nodes from http://naoliv.iq.unesp.br/osm/10779-nodes.txt) and run undelete without any problems.
Then run "undelete object" again and in the "Object ID" text box press "Home". Now see how JOSM uses 100% of the CPU (and you can't move the cursor in the box, nor delete anything and then insert new object IDs).

JOSM:

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-11-24 02:33:57
Last Changed Author: Don-vip
Revision: 7743
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Relative URL: ^/trunk
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-11-23 23:54:40 +0100 (Sun, 23 Nov 2014)
Last Changed Rev: 7743

Identification: JOSM/1.5 (7743 pt_BR) Linux Debian GNU/Linux testing (jessie)
Memory Usage: 247 MB / 8158 MB (94 MB allocated, but free)
Java version: 1.7.0_65, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u71-2.5.3-2
VM arguments: [-Dawt.useSystemAAFontSettings=on]

Plugins:
- Create_grid_of_ways (30762)
- ImageryCache (30738)
- OpeningHoursEditor (30737)
- PicLayer (30762)
- SimplifyArea (30791)
- buildings_tools (30762)
- conflation (0.1.7)
- contourmerge (1012)
- download_along (30762)
- editgpx (30737)
- geotools (30762)
- importvec (30762)
- jts (30762)
- log4j (30762)
- measurement (30737)
- merge-overlap (30784)
- notes (v0.9.5)
- opendata (30806)
- pbf (30762)
- pdfimport (30737)
- poly (30738)
- reverter (30737)
- scripting (30702)
- todo (29154)
- turnrestrictions (30762)
- undelete (30762)
- utilsplugin2 (30762)

Last errors/warnings:
- E: Falha ao localizar imagem 'maxspeed_icon.svg'
- W: Mappaint style "standard" (Maxspeed) icon "maxspeed_icon.svg" not found.

Attachments (4)

setVisible.PNG (113.2 KB ) - added by GerdP 5 years ago.
perf_20190131_175324.jfr (1.9 MB ) - added by GerdP 5 years ago.
Java flight recorder for JOSM session
jmc.png (94.7 KB ) - added by GerdP 5 years ago.
jmc.2.png (38.4 KB ) - added by GerdP 5 years ago.

Change History (8)

comment:1 by GerdP, 5 years ago

Owner: changed from team to GerdP

I can reproduce this problem (On Windows I have to use Pos1 instead of Home key). It takes very long (~15 secs) but finally JOSM reacts again. I'll try to find out more...

by GerdP, 5 years ago

Attachment: setVisible.PNG added

comment:2 by GerdP, 5 years ago

Component: Plugin undeleteCore
Keywords: performance added

Maybe a Java problem? It hangs for very long (time seems to depend on original cursor position) in Dialog.setVisible():

I guess the problem is that the content of the input field is much larger than normal (a string with more than 87700 characters).
The problem appears in all dialogs with a JosmTextField
For example, it also occurs when you enter such a long string as tag value and press Pos1 or press Ctrl+A.

by GerdP, 5 years ago

Attachment: perf_20190131_175324.jfr added

Java flight recorder for JOSM session

by GerdP, 5 years ago

Attachment: jmc.png added

by GerdP, 5 years ago

Attachment: jmc.2.png added

comment:3 by GerdP, 5 years ago

I've tried to nail down what happens with java flight recorder:

SET javaopt=-Xmx2G 
set jmcparm=-XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:StartFlightRecording=name=MyRecording2,settings=d:\dbg\gerd.jfc -XX:FlightRecorderOptions=defaultrecording=true,dumponexit=true,dumponexitpath=e:\ld\perf_%dt%_%t%.jfr
start "josm-custom" java.exe %jmcparm% %javaopt% -jar c:\josm\core\dist\josm-custom.jar %1 %2 %3 %4 %5 %6 %7 %8 %9

I execute JOSM with these settings and use the very long list as described above. This is what JMC shows for the period after pressing the Pos1 key: Method sun.font.FontDesignMetrics.handleCharWidth(int)uses more than 98% of CPU time.
Hope this helps. I have no idea what to do about it.


comment:4 by GerdP, 5 years ago

Owner: changed from GerdP to team

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to naoliv.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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