Modify ↓

Opened 3 weeks ago

Last modified 4 days ago

#24955 new defect

Memory leaks, performance issues across core

Reported by: gaben Owned by: team
Priority: normal Milestone: Longterm
Component: Core Version:
Keywords: performance memory leak gc Cc: GerdP

Description

I've done some profiling and found some issues around many common code paths, which affect every user.

While I don't currently have exact numbers, the memory gains should be significant, especially during long editing sessions, ranging from few hundred megabytes to possibly gigabytes. Also, many listeners were left registered after deleted layers, thousands of them.

There are also some performance issues; funniest for me, the selection performance is held back by the conflict manager panel, which checks every object, even when there is no conflict. Only if the panel is visible.

I'll be publishing the patch soon as well.

Attachments (0)

Change History (4)

comment:1 by gaben, 2 weeks ago

Keywords: performance memory leak gc added
Milestone: → Longterm

comment:2 by gaben, 4 days ago

After the Java 17 migration (#17858).

comment:3 by SekeRob, 4 days ago

Here's my JOSM.cfg that does aggressive garbage cleaning, yet still see JOSM at times sitting at 8GB RAM use, and I tend to work with very large data sets. If I though let JOSM sit for a while, it shaves off GBs memory use off the footprint. There's one point to make: Every update the installer is good to somehow delete my JOSM.cfg and put a new one in and the only seeming dif being the version number in the standard... this line "java-options=-Djpackage.app-version=1.5.19613" so it would be good if the installer just updates that line instead of ditching the user version painstakingly assembled and tested. Anyway, with my .cfg got a very stable environment. Thx.

[Application]
app.classpath=$APPDIR\josm-custom.jar
app.mainclass=org.openstreetmap.josm.gui.MainApplication

[JavaOptions]
java-options=-Djpackage.app-version=1.5.19613
java-options=-XX:MaxRAMPercentage=50.0
java-options=-Xms256m
java-options=-XX:+UseG1GC
java-options=-XX:G1PeriodicGCInterval=3000
java-options=-XX:+ShrinkHeapInSteps
java-options=--add-modules
java-options=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web
java-options=--add-exports=java.base/sun.security.action=ALL-UNNAMED
java-options=--add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED
java-options=--add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED
java-options=--add-opens=java.base/java.lang=ALL-UNNAMED
java-options=--add-opens=java.base/java.nio=ALL-UNNAMED
java-options=--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED
java-options=--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
java-options=--add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED
java-options=--add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED
java-options=--add-opens=java.prefs/java.util.prefs=ALL-UNNAMED

comment:4 by gaben, 4 days ago

With the fixes in place, you probably won't need them anyway ;)

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