﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
19875	Inactive Map Paint styles cause bad performance	GerdP	team	"==== What steps will reproduce the problem?
1. Have JOSM default style and a lot of (complex) inactive(!) Map Paint styles in preferences
2. Add a non-complex Map Paint style in the preferences dialog, e.g. the LIT style
3. Stop/Start JOSM

==== What is the expected result?
Quick reaction on 2. and no long delay in start phase
==== What happens instead?
Long delay and high CPU activity
==== Please provide any additional information below. Attach a screenshot if possible.
Watch the timestamps!
{{{
2020-10-02 10:04:40.365 FINE: Initializing map style resource://styles/standard/elemstyles.mapcss completed in 37 ms
2020-10-02 10:04:56.758 FINE: Initializing map style https://josm.openstreetmap.de/josmfile?page=Styles/Lit&zip=1 completed in 1 ms
}}}
I think problem is that the inactive styles are completely parsed (including lots of `String.intern()` actions although only the ""meta"" section is wanted. ~~Might be a regression of #18749~~ 
Note that this was tested with a local build using r17083 although the reported version in the log below says !r17080.
{{{
Build-Date:2020-10-02 09:36:29
Revision:17080
Is-Local-Build:true

Identification: JOSM/1.5 (17080 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Home 2004 (19041)
Memory Usage: 1987 MB / 3641 MB (1072 MB allocated, but free)
Java version: 1.8.0_191-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1920x1080 (scaling 1.0x1.0)
Maximum Screen Size: 1920x1080
Best cursor sizes: 16x16 -> 32x32, 32x32 -> 32x32
VM arguments: [-ea, -Dfile.encoding=UTF-8]
Program arguments: [--debug]

Plugins:
+ OpeningHoursEditor (35414)
+ PolygonCutOut (v0.7)
+ apache-commons (35524)
+ buildings_tools (35563)
+ continuosDownload (91)
+ ejml (35313)
+ geotools (35169)
+ gridify (1588746833)
+ jaxb (35092)
+ jts (35122)
+ merge-overlap (35248)
+ o5m (35248)
+ opendata (35513)
+ pbf (35446)
+ poly (35248)
+ reverter (35556)
+ terracer (35560)
+ undelete (35521)
+ utilsplugin2 (35487)

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Ph_Typhoon&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/SlovakiaBicycleRoutes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ColourGPSData&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ColourTag&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Kerbs&zip=1
- https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_AFR.zip
- https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_AME.zip
- https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_EUR_OC.zip
- https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_EUR_OR.zip
- https://raw.githubusercontent.com/yopaseopor/traffic_signs_style_JOSM/master/Styles_Traffic_signs_PAC.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lit&zip=1
}}}
"	defect	new	normal		Core			template_report performance	
