Opened 8 years ago

Last modified 7 years ago

#16510 closed enhancement

Strg + A (Select all) is slow — at Initial Version

Reported by: GerdP Owned by: team
Priority: normal Milestone: 18.09
Component: Core Version:
Keywords: performance select Cc: stoecker

Description

What steps will reproduce the problem?

  1. Download some data e.g. a small city with ~100.000 objects
  2. Zoom to a small area
  3. Use Strg+A to select all data or maybe a Search that returns all objects in the layer

What is the expected result?

Fast reaction

What happens instead?

Slow reaction, esp. when the "Selection List Window" is open

Please provide any additional information below. Attach a screenshot if possible.

I think one reason for the poor performace is that various instances of JosmAction use OsmUtils.isOsmCollectionEditable(selection) which is rather slow.
If the current data layer is not locked, this method iterates over all elements.
I wonder if that makes sense. Is it possible that the collection passed to OsmUtils.isOsmCollectionEditable() contains data from different layers?
If not, it would be enough to check a single element. If yes, do we have to use this method in all cases?
For example, updateEnabledState() in ModeNodeAction could easily be changed to check selection.size() == 1 first.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2018-07-09 01:47:59 +0200 (Mon, 09 Jul 2018)
Revision:14026
Build-Date:2018-07-08 23:50:14
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (14026 en) Windows 10 64-Bit
OS Build number: Windows 10 Home 1803 (17134)
Memory Usage: 256 MB / 6144 MB (76 MB allocated, but free)
Java version: 10.0.1+10, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1920x1080
Maximum Screen Size: 1920x1080

Plugins:
+ OpeningHoursEditor (34389)
+ apache-commons (34389)
+ buildings_tools (34212)
+ download_along (34389)
+ ejml (34389)
+ geotools (34125)
+ jts (34206)
+ measurement (34206)
+ o5m (34389)
+ opendata (34389)
+ pbf (34389)
+ poly (34389)
+ reverter (34271)
+ utilsplugin2 (34389)

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Change History (1)

by GerdP, 8 years ago

Attachment: cache.patch added
Note: See TracTickets for help on using tickets.