﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
20720	[Patch] Filtering in plugins list in preferences is slow	ygramul	simon04	"==== What steps will reproduce the problem?
1. Open preferences
2. Open the plugins tab
3. Start typing in the search textbox to filter the list

==== What is the expected result?

Filtering happens at a reasonable pace

==== What happens instead?

A large delay, at least for the first 1–2 characters typed.

==== Please provide any additional information below. Attach a screenshot if possible.

Profiling reveals that creating the components that make up each entry in the plugins list is the slow part; the filtering itself is not noticeable.

I've tried an alternative approach locally that simply builds those UI components once and later hides them for filtering instead of always removing everything and building the list anew. This is noticeably quicker and more responsive.

I've attached the quick patch I've tested with, but I'm not totally sure when and whether to invalidate the map from plugins to UI components, i.e. when the UI actually *has* to be rebuilt, so feedback is appreciated here.

{{{
Revision:17702
Is-Local-Build:true
Build-Date:2021-04-03 16:33:26

Identification: JOSM/1.5 (17702 SVN en) Windows 10 64-Bit
OS Build number: Windows 10 Pro 2009 (19042)
Memory Usage: 239 MB / 6124 MB (68 MB allocated, but free)
Java version: 14.0.1+7, AdoptOpenJDK, OpenJDK 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeel
Screen: \Display0 1920×1200 (scaling 1.00×1.00)
Maximum Screen Size: 1920×1200
Best cursor sizes: 16×16→32×32, 32×32→32×32
Environment variable LANG: en
System property file.encoding: UTF-8
System property sun.jnu.encoding: Cp1252
VM arguments: [-Dvisualvm.id=512973165650400, -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3\lib\idea_rt.jar=50188:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3\bin, -Dfile.encoding=UTF-8]

Plugins:
+ CADTools (1008)
+ FastDraw (35640)
+ HouseNumberTaggingTool (35640)
+ OpeningHoursEditor (35640)
+ PicLayer (2a9aa7a)
+ RoadSigns (35640)
+ ShapeTools (1240)
+ Tracer2 (35640)
+ apache-commons (35524)
+ apache-http (35589)
+ auto_tools (73)
+ buildings_tools (35669)
+ continuosDownload (91)
+ contourmerge (v0.1.6)
+ ejml (35458)
+ geotools (35458)
+ imagery_offset_db (35640)
+ jaxb (35543)
+ jna (35662)
+ jogl (1.2.3)
+ jts (35458)
+ kendzi3d
+ kendzi3d-resources (0.0.2)
+ log4j (35458)
+ mapwithai (1.7.1.4)
+ measurement (35640)
+ opendata (35640)
+ scripting (30798)
+ tageditor (35640)
+ terracer (35640)
+ turnlanes-tagging (288)
+ turnrestrictions (35640)
+ utilsplugin2 (35691)

Tagging presets:
+ https://github.com/kendzi/Simple3dBuildingsPreset/releases/download/0.9_2018-05-08/s3db-preset.zip

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Building_Levels_Labels&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Direction&zip=1
+ https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1
+ https://github.com/igitov/forest-josm-style/archive/master.zip
+ https://josm.openstreetmap.de/josmfile?page=Styles/LessObtrusiveNodes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lit&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/MapWithAI&zip=1

Last errors/warnings:
- 00001,690 W: extended font config - overriding 'filename.Myanmar_Text=mmrtext.ttf' with 'MMRTEXT.TTF'
- 00001,697 W: extended font config - overriding 'filename.Mongolian_Baiti=monbaiti.ttf' with 'MONBAITI.TTF'
- 00065,778 E: org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin kendzi3d. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.NoClassDefFoundError: com/jogamp/opengl/GLEventListener. Cause: java.lang.ClassNotFoundException: com.jogamp.opengl.GLEventListener
- 00065,848 W: Disable plugin - Could not load plugin 'kendzi3d'. Delete from preferences?
- 00067,694 E: Failed to locate image 'MapWithAI'
}}}
"	enhancement	closed	minor	21.04	Core	latest	fixed	template_report	
