gtk/testsuite
Benjamin Otte 8c608e9c1c sortlistmodel: Split the SortItem into 2 arrays
Instead of one item keeping the item + its position and sorting that
list, keep the items in 1 array and put the positions into a 2nd array.

This is generally slower while sorting, but allows multiple improvements:

1. We can replace items with keys
   This allows avoiding multiple slow lookups when using complex
   comparisons

2. We can keep multiple position arrays
   This allows doing a sorting in the background without actually
   emitting items-changed() until the array is completely sorted.

3. The main list tracks the items in the original model
   So only a single memmove() is necessary there, while the old version
   had to upgrade the position in every item.
Benchmarks:

        sorting a model of simple strings
                          old      new
        256,000 items   256ms    268ms
        512,000 items   569ms    638ms

        sorting a model of file trees, directories first, by size
                          old      new
         64,000 items   350ms    364ms
        128,000 items   667ms    691ms

        removing half the model
                          old      new
        512,000 items    24ms     15ms
      1,024,000 items    49ms     25ms
2020-07-22 14:30:49 +02:00
..
a11y headerbar: Show title buttons by default 2020-07-02 23:51:16 +05:00
css testsuite: Add a case with escaped Latin-1 code 2020-07-16 20:43:11 +02:00
gdk array: Add null-termination 2020-07-16 18:09:57 +02:00
gsk testsuite: Fix test case indentation 2020-07-17 05:49:11 +02:00
gtk sortlistmodel: Split the SortItem into 2 arrays 2020-07-22 14:30:49 +02:00
performance tests: Allow setting a subdir for output 2020-05-15 14:11:53 -04:00
reftests tests: Plug some more memory leaks 2020-07-09 00:33:14 -04:00
tools headerbar: Show title buttons by default 2020-07-02 23:51:16 +05:00
meson.build testsuite: Don't pass GDK_DEBUG for release builds 2020-06-28 13:42:02 -04:00