Modify

Opened 6 years ago

Closed 6 years ago

#16260 closed defect (fixed)

Delayed line drawing/slow JOSM

Reported by: jumat@… Owned by: jumat@…
Priority: normal Milestone: 18.05
Component: Core Version:
Keywords: template_report performance regression Cc:

Description (last modified by stoecker)

Bei der aktuellen/neuesten Version von JOSM ist mir aufgefallen, dass das Zeichnen von Linien mit deutlich wahrnehmbarer Verzögerung zwischen Punkt zu Punkt erfolgt. Klicke ich in die Karte um einen Node zu erstellen, ziehe dann die Maus weiter, bemerke ich leider deutlich, wie verzögert der Cursor dann den Mausbewegungen folgt.
Das ganze wird umso schlimmer, wie mehr (neue) Nodes ich gesetzt habe bzw. je mehr Daten in der Datenebene liegen.
--
In the newest version of JOSM I recognized, that drawing lines is delay recognizable between point to point. If I click into the map to create a node and move the mouse I see very obvious the delayed mouse movement following of the cursor.

The whole gets worse the more (new) points I did set or the more data is in the data layer.
--

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-05-06 23:56:40 +0200 (Sun, 06 May 2018)
Build-Date:2018-05-06 21:59:07
Revision:13710
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13710 de) Mac OS X 10.13.3
OS Build number: Mac OS X 10.13.3 (17D47)
Memory Usage: 951 MB / 951 MB (249 MB allocated, but free)
Java version: 1.8.0_101-b13, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 441084945 2560x1080
Maximum Screen Size: 2560x1080
VM arguments: [-Djava.library.path=/private/var/folders/mq/zwtfhdb533d13ylzfqpbjrfc0000gn/T/AppTranslocation/AA3C8E75-D113-43A5-8E5C-71608AACD3DD/d/JOSM.app/Contents/MacOS, -DLibraryDirectory=${HOME}/Library, -DDocumentsDirectory=${HOME}/Documents, -DApplicationSupportDirectory=${HOME}/Library/Application Support, -DCachesDirectory=${HOME}/Library/Caches, -DSandboxEnabled=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]
Dataset consistency test: No problems found

Plugins:
+ austriaaddresshelper (1511306130)
+ buildings_tools (34109)
+ continuosDownload (68)
+ contourmerge (1032)
+ editgpx (34109)
+ utilsplugin2 (34109)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Power&zip=1
+ https://pasharm.github.io/New_basic_style_for_JOSM/New_basic_style.mapcss

Last errors/warnings:
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!
- W: Unable to convert property color to type class java.awt.Color: found # of type class java.lang.String!

Attachments (4)

12260_1_stack.png (12.3 KB ) - added by Don-vip 6 years ago.
12260_1_visualvm.png (75.2 KB ) - added by Don-vip 6 years ago.
slow-JOSM.joz (2.7 MB ) - added by jumat@… 6 years ago.
slow-JOSM_2.joz (433.6 KB ) - added by jumat@… 6 years ago.

Change History (49)

comment:1 by Don-vip, 6 years ago

Owner: changed from team to jumat@…
Status: newneedinfo

English please

comment:2 by stoecker, 6 years ago

Description: modified (diff)

comment:3 by Don-vip, 6 years ago

Keywords: performance added

Can you please disable "New_basic_style_for_JOSM" and tell us if it improves the situation?

comment:4 by jumat@…, 6 years ago

I have disabled this style, but it does not improve the situation unfortunenatly.
When working with JOSM for more than 30min, it becomes slower and slower. The delay between one click, mouse moving and the other click is around 1sec in the meantime.
With previous version this issue don't occur so strong.

comment:5 by Don-vip, 6 years ago

You're running out of memory, see Download#Outofmemory and Help/CommandLineOptions#Javaoptions how to increase the memory allocated to JOSM.

comment:6 by jumat@…, 6 years ago

Ok, thanks for notice.
I have checked this sites. But where do I have to add the command lines "-Xmx..."? Can you explain this in detail?

comment:7 by jumat@…, 6 years ago

BTW: how many MB or GB should I reserve for Java/JOSM? What is your recommendation to get the programme working fine?

comment:8 by Don-vip, 6 years ago

Summary: Verzögertes LinienzeichnenDelayed line drawing

2 GB is a minimum to work correctly. You can set up to 3 or 4 GB if you're working on large datasets.

comment:9 by jumat@…, 6 years ago

I have increased RAM usage to 3072MB, so 3GB.
I've done this at: Preferences > Java > Java Control Panel > Java > View... and in the column "Runtime parameter" I've added "-Xmx3072m.
Is that correct?

comment:10 by Klumbumbus, 6 years ago

You can check how much memory is assigned to JOSM via Help -> show status report -> Memory Usage:

comment:11 by jumat@…, 6 years ago

Ok, I have checked this, see below:
What do you mean?

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-05-06 23:56:40 +0200 (Sun, 06 May 2018)
Build-Date:2018-05-06 21:59:07
Revision:13710
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13710 de) Mac OS X 10.13.4
OS Build number: Mac OS X 10.13.4 (17E202)
Memory Usage: 644 MB / 910 MB (356 MB allocated, but free)
Java version: 1.8.0_171-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 685389251 1920x1200
Maximum Screen Size: 1920x1200
VM arguments: [-Djava.library.path=/private/var/folders/fc/bv6j_0k50dq0vwz0_0nn3dq00000gn/T/AppTranslocation/51F07938-826A-43C5-A744-21E5A08D0EB7/d/JOSM.app/Contents/MacOS, -DLibraryDirectory=${HOME}/Library, -DDocumentsDirectory=${HOME}/Documents, -DApplicationSupportDirectory=${HOME}/Library/Application Support, -DCachesDirectory=${HOME}/Library/Caches, -DSandboxEnabled=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]
Dataset consistency test: No problems found

Plugins:
+ austriaaddresshelper (1525848529)
+ buildings_tools (34109)
+ continuosDownload (68)
+ contourmerge (1032)
+ utilsplugin2 (34109)

Map paint styles:
+ https://pasharm.github.io/New_basic_style_for_JOSM/New_basic_style.mapcss

comment:12 by Don-vip, 6 years ago

No you still have the default amount of memory:
Memory Usage: 644 MB / 910 MB (356 MB allocated, but free
It means 1 Gb is allocated to JOSM and you have only 356 Mb of free memory. That's not enough and probably the cause of your performance issue.

comment:13 by jumat@…, 6 years ago

Yes, but obviously I my trail in the java settings has no effect on the memory.
How can I this on a Mac computer? This description linked above does not help me in fact, beacause I do not know where I have to add this suffix -Xmx2048m or similar.

comment:14 by Don-vip, 6 years ago

For the macOS package I guess you must change the default value in Info.plist file?
It is set at <string>-Xmx1024m</string> we should probably increase it. It was defined a long time ago when computers had less memory.
I don't know how macOS works, if the file is copied somewhere in your user directory, or if a shortcut is created.

comment:15 by anonymous, 6 years ago

Thanks for this note. I could increase the memory to 3 GB. I hope, this will solve the problem. So I will observe it and keep you updated.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-05-06 23:56:40 +0200 (Sun, 06 May 2018)
Build-Date:2018-05-06 21:59:07
Revision:13710
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13710 de) Mac OS X 10.13.4
OS Build number: Mac OS X 10.13.4 (17E202)
Memory Usage: 899 MB / 2731 MB (651 MB allocated, but free)
Java version: 1.8.0_171-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 685389251 1920x1200
Maximum Screen Size: 1920x1200
VM arguments: [-Djava.library.path=/private/var/folders/fc/bv6j_0k50dq0vwz0_0nn3dq00000gn/T/AppTranslocation/A9D769FA-575D-474C-A791-65343DFE80BD/d/JOSM.app/Contents/MacOS, -DLibraryDirectory=${HOME}/Library, -DDocumentsDirectory=${HOME}/Documents, -DApplicationSupportDirectory=${HOME}/Library/Application Support, -DCachesDirectory=${HOME}/Library/Caches, -DSandboxEnabled=false, -Dapple.laf.useScreenMenuBar=true, -Dcom.apple.macos.use-file-dialog-packages=true, -Dcom.apple.macos.useScreenMenuBar=true, -Dcom.apple.mrj.application.apple.menu.about.name=JOSM, -Dcom.apple.smallTabs=true]
Dataset consistency test: No problems found

comment:16 by Don-vip, 6 years ago

In 13722/josm:

see #16260, see #16311 - increase default memory options to 2GB

comment:17 by jumat@…, 6 years ago

Do you mean the Version number by 13722?
I have increase memory in the file Info.plist, exaclty as you have written above. Do I have to change other string?

comment:18 by friedl, 6 years ago

Same problem here. After each node it takes about a second (or even more) until I can continue editing. Therefore this version is not useable for me.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-05-06 23:56:40 +0200 (Sun, 06 May 2018)
Build-Date:2018-05-06 21:59:07
Revision:13710
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13710 de) Windows 10 64-Bit
OS Build number: Windows 10 Home 1709 (16299)
Memory Usage: 934 MB / 2731 MB (126 MB allocated, but free)
Java version: 1.8.0_131-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1200
Maximum Screen Size: 1920x1200
Dataset consistency test: No problems found

Plugins:
+ PicLayer (34170)
+ apache-commons (34109)
+ austriaaddresshelper (1525848529)
+ ejml (34126)
+ geotools (34125)
+ jts (34038)
+ measurement (34109)
+ opendata (34153)
+ reverter (34109)
+ undelete (34109)
+ utilsplugin2 (34109)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://github.com/simon04/coloured-addresses.mapcss/raw/master/dist/coloured-addresses.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/AddressValidator&zip=1

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Region [TMS_BLOCK_v2] Resetting cache

comment:19 by Don-vip, 6 years ago

Type: enhancementdefect

comment:20 by Don-vip, 6 years ago

Keywords: regression added
Milestone: 18.05
Priority: normalcritical

comment:21 by Don-vip, 6 years ago

@friedl: From what version were you upgrading? Can you please share a session file where you notice the performance problem?

comment:22 by friedl, 6 years ago

I've fixed the problem on my computer:
It seems that one of the plugins (or the chached data of a plugin) caused the problem when using a newer version of JOSM.
There was no problem when using josm-snapshot-13629, but with josm-snapshot-13640 I had the performance problems.
After unsinstalling all plugins and then reinstalling the plugins the problem is gone.

Since I have a backup of the enitire JOSM installation I will try to find out which of the plugins caused the problems.

comment:23 by friedl, 6 years ago

I'm not sure anymore if the problem has anything to do with the plugins. The problem gets solved after opening the settings (without changing anyhing but saving the settings) and restarting JOSM a few times.

Note: I'm using a portabel version of JOSM using this script to start JOSM:

set APPDATA=.\PortableApps\JavaPortableLauncher\Data\AppData
.\PortableApps\CommonFiles\Java64\bin\java.exe -Xmx3G -jar .\Josm\josm-tested.jar
rmdir /s /q %LOCALAPPDATA%\JOSM

comment:24 by Don-vip, 6 years ago

Milestone: 18.05
Priority: criticalnormal

Hum that's very strange. And I can't find anything in the recent changes that could cause such a major performance hit.

comment:25 by jumat@…, 6 years ago

I have also tried to uninstall all activated plug-ins. But, there is no change at all.
If I use the JOSM in another country (usually I'am mapping in Austria, but sometimes also in HUN and SLO) it's even lower than in Austria. Hungarian mapping is really tough, because the delay is nearly 2 seconds!

comment:26 by Don-vip, 6 years ago

Same question, can you please share a session file where you notice the performance problem?

comment:27 by jumat@…, 6 years ago

Where is this file located in detail? Name?

comment:28 by Klumbumbus, 6 years ago

You should reproduce the problem and then click on File -> Save session as...

This saves all your current layers in one file. Attach the file here so we might be able to reproduce the problem.

comment:29 by friedl, 6 years ago

I found out that the problem reoccurs on my computer if I delete the file "%LOCALAPPDATA%\JOSM\cache\left-right-hand-traffic.osm".
Deleteing any other file (or all other files and subdirectories) in the cache directory does not influence the behaviour.

in reply to:  29 comment:30 by Don-vip, 6 years ago

Milestone: 18.05

Replying to friedl:

the problem reoccurs on my computer if I delete the file "%LOCALAPPDATA%\JOSM\cache\left-right-hand-traffic.osm".

Thanks! I can reproduce the problem and confirms it occurs the first time JOSM is launched after deleting the file.

by Don-vip, 6 years ago

Attachment: 12260_1_stack.png added

by Don-vip, 6 years ago

Attachment: 12260_1_visualvm.png added

comment:31 by Don-vip, 6 years ago

First problems found. The operations performed to optimize the left-right-hand-traffic dataset create a LOT of commands which stay in the command stack dialog even after the deletion of the temporary dataset:


This causes a massive CPU usage to refresh the command stack tree each time a new command is added (in draw mode, after every click):


comment:32 by jumat@…, 6 years ago

Can you solve this problem/issue with the next update?

comment:33 by Don-vip, 6 years ago

Sure.

comment:34 by Don-vip, 6 years ago

Resolution: fixed
Status: needinfoclosed

In 13729/josm:

fix #16260 - fix major performance problems seen during first JOSM launch:

  • new API to notify about undo/redo changes
  • use this API in Command Stack dialog to alter lightly the undo/redo trees instead of rebuilding them entirely at each command (very costly operation for large trees)
  • purge the command stack after computing the left/right traffic data to avoid starting JOSM with already many thousands nodes in undo/redo trees
  • avoid memory leak with JoinAreasAction when computing the left/right traffic data

comment:35 by Don-vip, 6 years ago

In 13736/josm:

see #16260 - fix build

comment:36 by Don-vip, 6 years ago

In 13739/josm:

see #16260 - fix spotbugs serialization warnings

by jumat@…, 6 years ago

Attachment: slow-JOSM.joz added

comment:37 by anonymous, 6 years ago

I have now uploaded the requested, exported file (session save aa..), when JOSM became working slowly.

by jumat@…, 6 years ago

Attachment: slow-JOSM_2.joz added

comment:38 by jumat@…, 6 years ago

I have now started JOSM and edited approx. 150 objects. I observed, that the cooling of my mac is working intensively, so I think, the CPU-load is high. Just JOSM is opened/active (and Google Chrome). The delayed line drawing is visible.

comment:39 by Don-vip, 6 years ago

Did you update JOSM?

comment:40 by jumat@…, 6 years ago

I'am using latest stable JOSM-Version 13710, which is shown on the starting page of JOSM. Where can I get the latest version?

comment:42 by jumat@…, 6 years ago

In the meantime I have installed latest JOSM Version (13878) and the problem with line drawing occurs again. Namely, after the first upload of data to OSM-server as I have observed.
e.g. I draw lines, points etc. and do tagging. Usally after 500-1000 points I do an upload to OSM into a new changeset. After this step, JOSM becomes working slowly and the problem with delayed lines occurs again.
Before upload, my settings in JOSM are set to check properties of adresses, streets etc. (Settings > OSM data checker > property rules).

comment:43 by jumat@…, 6 years ago

I would like to make the notification, that this issue (delayed line drawing/slow JOSM) is currently discussed in Austrian subforum of openstreetmap.org. (Post 130 onwards).
It occurs on various platforms (Mac, Linux, Windows), so it really seems to be a problem in JOSM/Java using resources of the computer.

comment:44 by anonymous, 6 years ago

Resolution: fixed
Status: closedreopened
Summary: Delayed line drawingDelayed line drawing/slow JOSM

comment:45 by Don-vip, 6 years ago

Resolution: fixed
Status: reopenedclosed

Please don't reopen tickets closed 7 weeks ago but create a new one with detailed and up to date information.

Modify Ticket

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