﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
23427	[Patch] load session performance strongly depends on order of layers	GerdP	team	"==== What steps will reproduce the problem?
I have a *.joz file containing ~272 layers, 1-122 are geo image layers, 123-244 are gpx tracks and 255-272  are rather small files containing the marker layers from gpx files with way points (so they appear at the top in the list of layers)
1. I have changed the order of those layers so that the marker layers are at the bottom of the list instead and saved that to a different markers-last.joz file
2. I compared the time that it takes to load the two different *.joz files. Both are nearly the same size, ~2.1 MB.

==== What is the expected result?
Times should be similar, esp. when both files are loaded a few times so that the disk cache doesn't matter.
==== What happens instead?
The time to load is very different. The markers-last.joz file takes ~7 seconds, the other less then 2s.
==== Please provide any additional information below. Attach a screenshot if possible.
I think the reason could be that the *.joz file contains a directory layers which contains the data for the waypoint gpx layers. My guess: With the faster version the data is stored at the beginning of the zip file, the slower version has it at the end.

If that's true it would be good to always store the content of the layers directory first in the zip file, no matter where the layers appear in the layer list.
The number of layers is probably not important, the size of the *.joz file mainly depends on the number of 
`<geoimage>`  sections, in my case ~37400 images.
{{{
Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2024-01-16 08:06:33 +0100 (Tue, 16 Jan 2024)
Revision:18940
Build-Date:2024-01-17 02:31:01
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (18940 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2009 (19045)
Memory Usage: 257 MB / 1888 MB (117 MB allocated, but free)
Java version: 17.0.8+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920×1080 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→32×32, 32×32→32×32
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_DE
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-Djpackage.app-version=1.5.18789, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\HWConsole.exe]

Plugins:
+ OpeningHoursEditor (36196)
+ RoadSigns (36196)
+ apache-commons (36176)
+ buildings_tools (36200)
+ comfort0 (36200)
+ o5m (36126)
+ pbf (36176)
+ poly (36126)
+ reltoolbox (36200)
+ reverter (36196)
+ undelete (36126)
+ utilsplugin2 (36200)

Validator rules:
+ c:\josm\core\resources\data\validator\combinations.mapcss
+ c:\josm\core\resources\data\validator\geometry.mapcss
+ c:\josm\core\resources\data\validator\relation.mapcss
+ c:\josm\core\resources\data\validator\unnecessary.mapcss
+ d:\java_tools\JOSM\mygeometry.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1

Last errors/warnings:
- 00000.509 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00000.511 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00001.087 E: java.security.KeyStoreException: Windows-ROOT not found. Cause: java.security.NoSuchAlgorithmException: Windows-ROOT KeyStore not available
}}}
"	enhancement	closed	normal	24.01	Core		fixed	template_report, performance	
