libsysprof: sort frames with timsort

These are largely pre-sorted, but not fully when you have merged data. This
uses timsort to speed that up a bit.

In particular, the comparison of various sorts break down to (for a
~32,000,000 record capture.

  g_array_sort_with_data() => 3.9 seconds
  qsort_r() = > 3.7 seconds
  gtk_tim_sort() => .79 seconds
This commit is contained in:
Christian Hergert
2023-08-18 16:46:28 -07:00
parent c730ce8320
commit bf73d142dc
7 changed files with 1661 additions and 2 deletions

View File

@ -145,6 +145,7 @@ libsysprof_private_sources = [
'sysprof-process-info.c',
'sysprof-strings.c',
'sysprof-symbol-cache.c',
'timsort/gtktimsort.c',
]
if polkit_dep.found()