#20563 closed defect (fixed)
[Patch] PluginListParser.parse amounts to 80% of allocations during startup
Reported by: | simon04 | Owned by: | simon04 |
---|---|---|---|
Priority: | normal | Milestone: | 21.03 |
Component: | Core | Version: | |
Keywords: | template_report profiling heap alloc | Cc: |
Description
What steps will reproduce the problem?
java -agentpath:async-profiler-2.0-rc-macos-x64/build/libasyncProfiler.so=start,file=profile.html,event=alloc -jar josm-latest.jar
https://github.com/jvm-profiling-tools/async-profiler
What is the expected result?
PluginListParser.parse does not contribute significantly to heap allocations
What happens instead?
PluginListParser.parse amounts to 80% of allocations during startup
Please provide any additional information below. Attach a screenshot if possible.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-03-01 23:51:35 +0100 (Mon, 01 Mar 2021) Revision:17551 Build-Date:2021-03-02 02:30:57 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (17551 en) Mac OS X 10.16 OS Build number: macOS 11.2.1 (20D74) Memory Usage: 280 MB / 2048 MB (108 MB allocated, but free) Java version: 15.0.2+7, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.formdev.flatlaf.FlatLightLaf Screen: Display 1 1680×1050 (scaling 2,00×2,00) Display 2 3008×1692 (scaling 2,00×2,00) Maximum Screen Size: 3008×1692 Best cursor sizes: 16×16→16×16, 32×32→32×32 Plugins: + flatlaf (35703) + utilsplugin2 (35691) Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1
Attachments (3)
Change History (12)
by , 4 years ago
Attachment: | profile.html.gz added |
---|
comment:1 by , 4 years ago
comment:2 by , 4 years ago
The file is okay on my disk, but attachment:profile.html.gz is broken. I'll upload the non-gz variant.
by , 4 years ago
Attachment: | profile.html added |
---|
by , 4 years ago
Attachment: | 20563.patch added |
---|
comment:3 by , 4 years ago
Milestone: | → 21.03 |
---|---|
Owner: | changed from | to
Summary: | PluginListParser.parse amounts to 80% of allocations during startup → [Patch] PluginListParser.parse amounts to 80% of allocations during startup |
comment:4 by , 4 years ago
So much better. I wonder why we didn't think of storing the attributes directly.
comment:6 by , 4 years ago
It seems these tests, or plugins, need an update:
org.openstreetmap.josm.plugins.PluginHandlerTest.testPluginInformationAction() org.openstreetmap.josm.actions.downloadtasks.PluginDownloadTaskTest.testUpdatePluginCorrupt
See jenkins/job/JOSM/jdk=JDK8/lastCompletedBuild/testReport/
follow-up: 9 comment:8 by , 4 years ago
Err, concerning the first test, the class Attributes
, starting with Java 11,
This map and its views have a predictable iteration order, namely the order that keys were inserted into the map, as with LinkedHashMap.
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/jar/Attributes.html
PluginDownloadTaskTest found an actual glitch in my commit...
comment:9 by , 4 years ago
Replying to simon04:
PluginDownloadTaskTest found an actual glitch in my commit...
That's why we have them :)
is the html file ok? I can't open it