Changeset 18691 in josm for trunk/test/unit/org


Ignore:
Timestamp:
2023-03-14T14:37:10+01:00 (21 months ago)
Author:
taylor.smock
Message:

Significantly reduce cost of large presets like Name Suggestion Index

This reduces the startup CPU of TaggingPresets#initialize by ~29% and the memory
by ~55%. This was done by adding a batch addActiveLayerChangeListeners method
in MainLayerManager.

This additionally reduces the cost of
TaggingPresetSelect$PresetClassification.simplifyString (used by the preset
search dialog) by ~28% CPU cycles and ~58% memory allocations. This was done by
having a single static Pattern which was reused -- most of the remaining
potentially reducible cost for simplifyString is from Matcher initialization.
This would require thread local variables, so may not be worthwhile for now.

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
3 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.