Opened 3 weeks ago
Last modified 3 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 , 2 weeks ago
| Keywords: | performance memory leak gc added |
|---|---|
| Milestone: | → Longterm |
comment:2 by , 4 days ago
comment:3 by , 3 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



After the Java 17 migration (#17858).