Opened 5 years ago
Last modified 4 years ago
#20703 closed defect
GeographicReader.createOrGetWay is slow due to many Arrays.copyOf — at Version 2
| Reported by: | simon04 | Owned by: | Don-vip |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin opendata | Version: | |
| Keywords: | template_report performance profiling intellij yourkit | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Run profiler while opening https://osmdata.openstreetmap.de/download/simplified-land-polygons-complete-3857.zip
What is the expected result?
What happens instead?
A considerable amount of time is spent in GeographicReader.createOrGetWay is slow due to many Arrays.copyOf
Please provide any additional information below. Attach a screenshot if possible.
java.util.Arrays.copyOf(Object[], int) org.openstreetmap.josm.tools.Utils.addInArrayCopy(Object[], Object) org.openstreetmap.josm.data.osm.Way.addNode(Node) org.openstreetmap.josm.plugins.opendata.core.io.geographic.GeographicReader.createOrGetWay(LineString) org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpReader.processGeometryCollection(GeometryCollection) org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpReader.parseFeature(Feature, Component) org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpReader.parse(File, ProgressMonitor) org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpReader.parseDataSet(InputStream, File, AbstractDataSetHandler, ProgressMonitor) org.openstreetmap.josm.plugins.opendata.core.io.geographic.ShpImporter.parseDataSet(InputStream, ProgressMonitor) org.openstreetmap.josm.gui.io.importexport.OsmImporter.loadLayer(InputStream, File, String, ProgressMonitor) org.openstreetmap.josm.gui.io.importexport.OsmImporter.importData(InputStream, File, ProgressMonitor) org.openstreetmap.josm.plugins.opendata.core.io.AbstractImporter.importData(File, ProgressMonitor) org.openstreetmap.josm.gui.io.importexport.FileImporter.importDataHandleExceptions(File, ProgressMonitor) org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.importData(FileImporter, List) org.openstreetmap.josm.actions.OpenFileAction$OpenFileTask.realRun() org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun() org.openstreetmap.josm.gui.PleaseWaitRunnable.run() java.util.concurrent.Executors$RunnableAdapter.call() java.util.concurrent.FutureTask.run() java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) java.util.concurrent.ThreadPoolExecutor$Worker.run() java.lang.Thread.run()
Revision:17702 Is-Local-Build:true Build-Date:2021-04-02 15:33:31 Identification: JOSM/1.5 (17702 SVN de) Mac OS X 10.16 OS Build number: macOS 11.2.3 (20D91) Memory Usage: 130 MB / 2048 MB (112 MB allocated, but free) Java version: 16+36, AdoptOpenJDK, OpenJDK 64-Bit Server VM Look and Feel: com.apple.laf.AquaLookAndFeel Screen: Display 1 1440×900 (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 Environment variable LANG: en_IE.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8
Change History (3)
by , 5 years ago
| Attachment: | flamegraph.png added |
|---|
comment:1 by , 5 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 5 years ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.



