Modify

Opened 6 weeks ago

Closed 6 weeks ago

Last modified 6 days ago

#16260 closed defect (fixed)

Delayed line drawing

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 weeks ago.
12260_1_visualvm.png (75.2 KB) - added by Don-vip 6 weeks ago.
slow-JOSM.joz (2.7 MB) - added by jumat@… 4 weeks ago.
slow-JOSM_2.joz (433.6 KB) - added by jumat@… 4 weeks ago.

Change History (46)

comment:1 Changed 6 weeks ago by Don-vip

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

English please

comment:2 Changed 6 weeks ago by stoecker

Description: modified (diff)

comment:3 Changed 6 weeks ago by Don-vip

Keywords: performance added

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

comment:4 Changed 6 weeks ago by jumat@…

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 Changed 6 weeks ago by Don-vip

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

comment:6 Changed 6 weeks ago by jumat@…

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 Changed 6 weeks ago by jumat@…

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

comment:8 Changed 6 weeks ago by Don-vip

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 Changed 6 weeks ago by jumat@…

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 Changed 6 weeks ago by Klumbumbus

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

comment:11 Changed 6 weeks ago by jumat@…

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 Changed 6 weeks ago by Don-vip

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 Changed 6 weeks ago by jumat@…

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 Changed 6 weeks ago by Don-vip

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 Changed 6 weeks ago by anonymous

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 Changed 6 weeks ago by Don-vip

In 13722/josm:

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

comment:17 Changed 6 weeks ago by jumat@…

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 Changed 6 weeks ago by friedl

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 Changed 6 weeks ago by Don-vip

Type: enhancementdefect

comment:20 Changed 6 weeks ago by Don-vip

Keywords: regression added
Milestone: 18.05
Priority: normalcritical

comment:21 Changed 6 weeks ago by Don-vip

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

comment:22 Changed 6 weeks ago by friedl

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 Changed 6 weeks ago by friedl

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 Changed 6 weeks ago by Don-vip

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 Changed 6 weeks ago by jumat@…

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 Changed 6 weeks ago by Don-vip

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

comment:27 Changed 6 weeks ago by jumat@…

Where is this file located in detail? Name?

comment:28 Changed 6 weeks ago by Klumbumbus

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 Changed 6 weeks ago by friedl

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.

comment:30 in reply to:  29 Changed 6 weeks ago by Don-vip

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.

Changed 6 weeks ago by Don-vip

Attachment: 12260_1_stack.png added

Changed 6 weeks ago by Don-vip

Attachment: 12260_1_visualvm.png added

comment:31 Changed 6 weeks ago by Don-vip

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 Changed 6 weeks ago by jumat@…

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

comment:33 Changed 6 weeks ago by Don-vip

Sure.

comment:34 Changed 6 weeks ago by Don-vip

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 Changed 5 weeks ago by Don-vip

In 13736/josm:

see #16260 - fix build

comment:36 Changed 5 weeks ago by Don-vip

In 13739/josm:

see #16260 - fix spotbugs serialization warnings

Changed 4 weeks ago by jumat@…

Attachment: slow-JOSM.joz added

comment:37 Changed 4 weeks ago by anonymous

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

Changed 4 weeks ago by jumat@…

Attachment: slow-JOSM_2.joz added

comment:38 Changed 4 weeks ago by jumat@…

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 Changed 4 weeks ago by Don-vip

Did you update JOSM?

comment:40 Changed 4 weeks ago by jumat@…

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:41 Changed 4 weeks ago by Don-vip

comment:42 Changed 6 days ago by jumat@…

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).

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.