Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#5631 closed enhancement (fixed)

[patch] Faster selection with many objects

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

Description

When I select objects in editor, the selection is sorted and put into the selection list.

When number of objects is in order of tens of thousands or even hundreds of thousands, this sorting is very slow and causes a noticeable delay (several seconds)

I added a preference, "selection.fast_sort_above" with default of 10000.

If more objects than that is selected, fast comparator is used instead.

The fast comparator (compares only by ID and type) is approximately 2.5 times faster than old one (when having primitives with many complicated names, the speedup could be even higher). The sort order is worse from user's point of view (names are not taken into account), but when having 10000 objects in the small window with the list, the list is already quite unusable anyway ....

Also, in compareType is is not necessary to test for types being equal, as the function is never called for such arguments (compareName/compareId is used instead), so I removed the check, bringing further speedup.

I also added preference "selection.no_sort_above" with default value of 100000, above which there will be no sorting of the list, since with increasing number of objects, even the fast sort becomes slow.

Attachments (1)

speed-sort.patch (2.9 KB ) - added by bilbo 14 years ago.
Patch to faster or no sorting when object count exceeds given values

Download all attachments as: .zip

Change History (3)

by bilbo, 14 years ago

Attachment: speed-sort.patch added

Patch to faster or no sorting when object count exceeds given values

comment:1 by bastiK, 14 years ago

Resolution: fixed
Status: newclosed

In [3654/josm]:

applied #5631 (patch by bilbo) - Faster selection with many objects

comment:2 by bastiK, 14 years ago

It would be great to see some progress on #5209, seems to be a considerable bottleneck.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.