Modify

Opened 4 years ago

Last modified 4 days ago

#20366 new enhancement

JOSM rendering is very slow especially on UHD displays

Reported by: *Martin* Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: performance hidpi Cc:

Description

After upgrading to UHD (4K) monitor I experience slow rendering in JOSM which makes mapping no more pleasant. Slowdown is higher if I move map outside of boundaries of downloaded data (see attached video) but it is also slow on normal editing, or with just panning signle layer of background imagery.

JOSM Version: 17447 (reproducible also on current josm-tested)
JRE: OpenJDK 16 (reproducible also on OpenJDK 15)
OS: Debian Bullseye
HW: Radeon RX 5500 (HW acceleration enabled), AMD Ryzen 3900X, 64GB RAM

I run JOSM like this:

java -Dsun.java2d.uiScale=2 -Dsun.java2d.opengl=True -jar ~/josm-tested.jar

In the 2nd line of the console output I see:

OpenGL pipeline enabled for default config on screen 0

Parameter -Dsun.java2d.opengl=True actually makes no difference for the speed.

Attachments (1)

slow-josm.mp4 (13.4 MB ) - added by *Martin* 4 years ago.

Change History (9)

by *Martin*, 4 years ago

Attachment: slow-josm.mp4 added

comment:1 by Klumbumbus, 4 years ago

Keywords: performance hidpi added

comment:2 by ezekielf@…, 3 years ago

I am also experiencing this issue. The status report below lists the scaled resolution of 2560×1440, but the native display resolution is 3840×2160. If I resize the JOSM window to around 1/4 to 1/3 of the screen, panning, zooming, and draw operations are smooth and feel similar to running JOSM on the laptop's built in display (2880×1800) or on the 1920×1200 external display I used previously. With the JOSM window filling the screen on the 3840×2160 display, panning, zooming, and draw operations are very laggy.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-01-02 21:24:43 +0100 (Sun, 02 Jan 2022)
Revision:18360
Build-Date:2022-01-02 20:26:19
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18360 en) Mac OS X 12.2.1
OS Build number: macOS 12.2.1 (21D62)
Memory Usage: 519 MB / 4096 MB (239 MB allocated, but free)
Java version: 11.0.13+8-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.apple.laf.AquaLookAndFeel
Screen: Display 731479689 2560×1440 (scaling 2.00×2.00) Display 731479690 2560×1440 (scaling 2.00×2.00) Display 69733382 1440×900 (scaling 2.00×2.00)
Maximum Screen Size: 2560×1440
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: en_US.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djava.util.Arrays.useLegacyMergeSort=true, --add-exports=jdk.deploy/com.sun.deploy.config=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-reads=java.naming=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.action=ALL-UNNAMED,java.desktop, --add-reads=java.base=ALL-UNNAMED,java.desktop, --add-exports=java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-exports=java.desktop/com.apple.eawt=ALL-UNNAMED, --add-exports=java.desktop/sun.awt=ALL-UNNAMED,java.desktop, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-exports=java.base/sun.security.validator=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop, --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, --add-exports=java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop, --add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/sun.applet=ALL-UNNAMED,java.desktop,jdk.jsobject, --add-exports=java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-exports=java.base/sun.security.util=ALL-UNNAMED,java.desktop, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-reads=java.desktop=ALL-UNNAMED,java.naming, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-exports=java.base/sun.security.x509=ALL-UNNAMED,java.desktop, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-exports=java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop, --add-exports=java.base/sun.security.provider=ALL-UNNAMED,java.desktop]

Plugins:
+ FastDraw (35893)
+ apache-commons (35893)
+ apache-http (35893)
+ buildings_tools (35916)
+ conflation (0.6.9)
+ contourmerge (v0.1.8)
+ jna (35893)
+ jts (35893)
+ mapwithai (1.9.8)
+ measurement (35893)
+ shrinkwrap (v1.0.4)
+ terracer (35893)
+ todo (30306)
+ undelete (35893)
+ utilsplugin2 (35893)
+ wikipedia (605)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1

comment:3 by ezekielf@…, 3 years ago

I tried launching JOSM with the -Dsun.java2d.uiScale=1 flag and that made the performance much smoother. Here's a short video comparison: https://youtu.be/bKO1RqSx3c4
Looks to me like the UI scaling has a significant negative impact on performance.

comment:4 by skyper, 3 years ago

General (java) system settings and the graphic card driver might come into play, here. The wrong native resolution might be an indicator.

@ezekielf:
Please, try it with java 17 and check your general java system settings. Do other java programs show the same behavior on your system?

Last edited 3 years ago by skyper (previous) (diff)

comment:5 by ezekielf@…, 3 years ago

I've tried with java 17 and am seeing the same behavior. I normally use JOSM via OpenWebStart and that is using java 11. What general java system settings would be useful to see? JOSM is the only java program I use, so I have nothing to compare it to.

in reply to:  5 comment:6 by skyper, 3 years ago

Replying to ezekielf@…:

I've tried with java 17 and am seeing the same behavior.

Thanks, but not the best news as this would have been an easy solution.

I normally use JOSM via OpenWebStart and that is using java 11.

How did you install JOSM? Current macOS-package ships java 17.

What general java system settings would be useful to see?

Sorry, I have no clue about macOS. Someone else needs to answer this and probably talk off.

comment:7 by taylor.smock, 3 years ago

I did a bit of profiling for #21901, and the hatching was surprisingly expensive when panning. I'd expect it to be the same when not panning.

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 *Martin*.
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.