Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5631 closed enhancement (fixed)

[patch] Faster selection with many objects

Reported by: bilbo Owned by: team
Priority: normal 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 3 years ago.
Patch to faster or no sorting when object count exceeds given values

Download all attachments as: .zip

Change History (3)

Changed 3 years ago by bilbo

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

comment:1 Changed 3 years ago by bastiK

  • Resolution set to fixed
  • Status changed from new to closed

In [3654/josm]:

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

comment:2 Changed 3 years ago by bastiK

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.