Opened 14 years ago

Last modified 11 years ago

#6185 closed defect

Validator extremely slow if duplicates are selected — at Version 2

Reported by: bilbo Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: performance Cc:

Description (last modified by Don-vip)

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.

Change History (3)

by bilbo, 14 years ago

Attachment: many_dupes_slow_bug.osm.bz2 added

Test case (actually older version of real OSM data) demonstrating the bug

comment:1 by simon04, 14 years ago

Component: CoreCore validator

comment:2 by Don-vip, 12 years ago

Description: modified (diff)
Keywords: performance added
Note: See TracTickets for help on using tickets.