gtk2/testsuite/gtk
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
..
file-chooser-test-dir build: Move gtk/tests to testsuite/gtk 2013-05-15 15:37:16 +02:00
focus-chain headerbar: Show title buttons by default 2020-07-02 23:51:16 +05:00
icons testsuite: add a test for non-square symbolic icons 2015-06-12 08:55:23 -07:00
icons2 icon-theme: Test inheritance vs. generic fallback 2014-09-21 16:34:27 -04:00
ui Add some tests for new GtkBuilder syntax 2020-05-30 19:31:38 -04:00
accel.c Differentiate keypad keysyms in accelerators 2020-05-21 19:38:19 -04:00
accessible.c testsuite: Fix the accessible test 2020-03-20 10:03:04 -04:00
action.c Add a test for the previous fix 2020-06-01 13:52:50 -04:00
adjustment.c adjustment: Remove deprecated API 2016-10-18 00:29:19 +02:00
autotestkeywords.cc testsuite: Update C++ keywords test to GTK 3.0.0 2018-03-18 19:20:46 +01:00
bitmask.c testsuite: Fix a memory leak in the bitmask tests 2020-07-08 17:44:16 -04:00
bitset.c bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice() 2020-07-06 03:42:43 +02:00
builder.c filefilter: Drop GtkFileFilterFlags 2020-07-05 15:10:13 -04:00
builderparser.c Print out the file name we're testing 2020-06-01 21:06:04 +01:00
cellarea.c treeview column: Make final 2019-05-28 23:22:57 -04:00
check-icon-names.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
constraint-solver.c Use explicit values for constraint strength 2019-07-01 12:39:24 +01:00
cssprovider.c cssprovider test: Remove style property test case 2017-07-19 21:27:14 -04:00
defaultvalue.c gtk: Remove GtkPropertySelection 2020-06-26 07:13:32 +02:00
displayclose.c displayclose: Quietly skip if no X available 2020-05-15 14:58:58 -04:00
entry.c entry, spin button: Drop redundant API 2019-02-28 16:34:00 -05:00
expression.c stringfilter: Make the constructor take an expression 2020-07-16 20:43:16 +02:00
filter.c Merge branch 'wip/otte/for-master' into 'master' 2020-07-16 19:43:45 +00:00
filterlistmodel-exhaustive.c testsuite: Fix a leak 2020-07-20 22:28:01 +02:00
filterlistmodel.c filterlistmodel: Don't filter out every 513th element 2020-07-09 22:29:36 +02:00
filtermodel.c testsuite: Assorted leak fixes 2020-07-08 17:44:49 -04:00
flattenlistmodel.c listmodels: Stop respecting item-type 2020-07-05 02:59:21 +02:00
floating.c build: Move gtk/tests to testsuite/gtk 2013-05-15 15:37:16 +02:00
flowbox.c Add a test for a flowbox crash 2020-05-13 21:47:11 -04:00
gestures.c Replace most remaining uses of container api 2020-05-11 22:38:21 -04:00
grid-layout.c Fix minor typos 2020-05-28 11:00:03 +03:00
grid.c grid: Remove a test for grid container functionality 2020-05-11 22:21:39 -04:00
gtk.test.in Add a forgotten file 2017-10-18 18:52:06 +02:00
gtktreemodelrefcount.c testsuite: Strip newlines from g_warning and g_error 2016-02-28 12:23:12 -05:00
gtktreemodelrefcount.h build: Move gtk/tests to testsuite/gtk 2013-05-15 15:37:16 +02:00
icontheme.c icontheme: Update the api 2020-02-18 20:32:17 -05:00
listbox.c testsuite: Fix listbox tests 2020-05-11 22:21:39 -04:00
liststore.c build: Move gtk/tests to testsuite/gtk 2013-05-15 15:37:16 +02:00
main.c Fix minor typos 2020-05-28 11:00:03 +03:00
maplistmodel.c listmodels: Stop respecting item-type 2020-07-05 02:59:21 +02:00
meson.build testsuite: Add exhaustive sortlistmodel test 2020-07-22 14:04:40 +02:00
modelrefcount.c Replace gtk_widget_destroy everywhere 2020-05-11 12:20:59 -04:00
multiselection.c multiselection tests: Plug a leak 2020-07-16 08:54:36 -04:00
no-gtk-init.c testsuite: Stop using g_test_bug() 2019-05-12 17:28:18 +02:00
notify.c gtk: Remove GtkPropertySelection 2020-06-26 07:13:32 +02:00
object.c Update a comment 2020-06-18 16:57:27 +01:00
objects-finalize.c gtk: Remove GtkPropertySelection 2020-06-26 07:13:32 +02:00
papersize.c build: Move gtk/tests to testsuite/gtk 2013-05-15 15:37:16 +02:00
popover.c Use gtk_window_set_child throughout 2020-05-04 22:53:08 -04:00
propertylookuplistmodel.c Replace most remaining uses of container api 2020-05-11 22:38:21 -04:00
rbtree-crash.c testsuite: Don't g_print from tests 2020-03-20 10:03:04 -04:00
rbtree.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
recentmanager.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
regression-tests.c Use gtk_window_destroy 2020-05-11 12:20:57 -04:00
revealer-size.c Use gtk_revealer_set_child throughout 2020-05-04 22:53:08 -04:00
scrolledwindow.c scrolledwindow: Don't take adjustments in new() 2020-06-24 11:25:09 -04:00
searchbar.c Add basic searchbar set_key_capture_widget tests 2018-05-19 10:18:50 +02:00
shortcuts.c testsuite: Assorted leak fixes 2020-07-08 17:44:49 -04:00
singleselection.c selectionmodels: Add set_model() support 2020-07-05 02:59:21 +02:00
slicelistmodel.c listmodels: Stop respecting item-type 2020-07-05 02:59:21 +02:00
sorter.c sorter: Add tests 2020-05-30 19:26:44 -04:00
sortlistmodel-exhaustive.c testsuite: Add exhaustive sortlistmodel test 2020-07-22 14:04:40 +02:00
sortlistmodel.c sortlistmodel: Split the SortItem into 2 arrays 2020-07-22 14:30:49 +02:00
sortmodel.c Replace gtk_widget_destroy everywhere 2020-05-11 12:20:59 -04:00
spinbutton.c Add some spinbutton tests 2014-08-14 00:04:10 -04:00
stringlist.c stringlist: Remove n_additions argument from gtk_string_list_splice() 2020-07-05 02:59:21 +02:00
templates.c Fix minor typos 2020-05-28 11:00:03 +03:00
test-focus-chain.c tests: Plug some more memory leaks 2020-07-09 00:33:14 -04:00
textbuffer.c testsuite: Assorted leak fixes 2020-07-08 17:44:49 -04:00
textiter.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
theme-validate.c testsuite: Add theme-validate test 2019-04-18 02:28:42 +02:00
timsort.c timsort: Add change tracking to gtk_tim_sort_step() 2020-07-22 14:04:40 +02:00
tooltips.c Make tooltip properties idiomatic 2020-06-05 20:32:26 +01:00
treelistmodel.c Fix treelistmodel tests 2019-12-04 18:30:37 -05:00
treemodel.c testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
treemodel.h testsuite/gtk: Add common_cflags to build 2020-03-07 16:28:04 +01:00
treepath.c build: Move gtk/tests to testsuite/gtk 2013-05-15 15:37:16 +02:00
treesorter.c treesorter tests: Add a comment 2020-07-16 12:14:28 -04:00
treestore.c testsuite: Stop using g_test_bug() 2019-05-12 17:28:18 +02:00
treeview.c Build print backends with common_cflags 2020-05-19 08:32:33 +02:00
typename.c builder: Improve type name mangling 2019-12-13 14:21:44 -05:00
widget-refcount.c testsuite: add widget refcount test case 2020-05-11 12:20:59 -04:00
widgetorder.c Replace most remaining uses of container api 2020-05-11 22:38:21 -04:00
window.c Use gtk_window_destroy 2020-05-11 12:20:57 -04:00