Opened 13 years ago
Closed 11 years ago
#6185 closed defect (fixed)
Validator extremely slow if duplicates are selected
Reported by: | bilbo | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | performance | Cc: |
Description (last modified by )
How to reproduce:
1) Load attached file
2) Press "Validate"
3a) Single click "Errors/Duplicated ways (8796)" (so nothing will be selected)
4a) press "Fix" -> all duplicated ways gets fixed fast (like 5 seconds)
Now close the file and load and validate it again - repeat steps 1) and 2)
3b) Double click "Errors/Duplicated ways (8796)" (so all duplicated ways will be selected)
4b) press "Fix" -> Fixing will take ages (many minutes, possibly more than hour by guessing from the rate on the progressbar)
This happens with other validation types too (like fixing untagged unconnected nodes), though the result between "Selected" and "unselected" case is not so big (for untagged and unconnected nodes it is "only" about 2 times slower).
It seems that UndoRedoHandler.addNoRedraw in the second case somehow causes some events to be fired when the affected ways are selected (in profiler I saw lot of time spent in DatasetEventManager$1.run(), DatasetEventManager.fireEvents() and DatasetEventManager.fireConsolidatedEvents()) and way too much CPU time is spent in that cases.
Attachments (1)
Change History (4)
by , 13 years ago
Attachment: | many_dupes_slow_bug.osm.bz2 added |
---|
comment:1 by , 13 years ago
Component: | Core → Core validator |
---|
comment:2 by , 11 years ago
Description: | modified (diff) |
---|---|
Keywords: | performance added |
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The fix now takes the same time with or without selected ways.
Test case (actually older version of real OSM data) demonstrating the bug