-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #23468: Improve performance in the Validator tree window
A large number of entries in the validator tree would cause the UI to lock for significant periods of time when switching to a layer with many errors. Most of the time spent was in `AlphanumComparator.compare`. We need to use `AlphanumComparator` since `String.compare` would improperly sort strings with accented characters. The performance optimizations for this patch come from the following locations: * Extracting string chunk comparison to its own method (which can be compiled to native code) * Using `String.substring` instead of a `StringBuilder` when getting a string chunk for comparison Both of those methods may be compiled to native code, but absent code compilation, the performance improvements are as follows (as measured using an overpass download of `Mesa County, Colorado`): * -86.4% CPU usage (3.366s to 0.459s) * -99.9% memory allocations (2.37 GB to 2.07 MB) git-svn-id: https://josm.openstreetmap.de/svn/trunk@18973 0c6e7542-c601-0410-84e7-c038aed88b3b
- Loading branch information
taylor.smock
committed
Feb 12, 2024
1 parent
9b2c954
commit 468a86e
Showing
1 changed file
with
60 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters