Opened 11 years ago

Closed 8 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 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$, DatasetEventManager.fireEvents() and DatasetEventManager.fireConsolidatedEvents()) and way too much CPU time is spent in that cases.

Attachments (1)

many_dupes_slow_bug.osm.bz2 (400.2 KB) - added by bilbo 11 years ago.
Test case (actually older version of real OSM data) demonstrating the bug

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by bilbo

Attachment: many_dupes_slow_bug.osm.bz2 added

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

comment:1 Changed 11 years ago by simon04

Component: CoreCore validator

comment:2 Changed 9 years ago by Don-vip

Description: modified (diff)
Keywords: performance added

comment:3 Changed 8 years ago by Don-vip

Resolution: fixed
Status: newclosed

The fix now takes the same time with or without selected ways.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.