mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 08:00:53 +00:00
sysprof: use gtk_tim_sort() to sort rectangles for bsearch
This commit is contained in:
@ -22,6 +22,8 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
|
#include "timsort/gtktimsortprivate.h"
|
||||||
|
|
||||||
#include "sysprof-animation.h"
|
#include "sysprof-animation.h"
|
||||||
#include "sysprof-callgraph-private.h"
|
#include "sysprof-callgraph-private.h"
|
||||||
#include "sysprof-category-icon.h"
|
#include "sysprof-category-icon.h"
|
||||||
@ -791,7 +793,11 @@ sysprof_flame_graph_generate_worker (GTask *task,
|
|||||||
|
|
||||||
generate (array, g->root, &area, TRUE);
|
generate (array, g->root, &area, TRUE);
|
||||||
|
|
||||||
g_array_sort (array, sort_by_coord);
|
gtk_tim_sort (array->data,
|
||||||
|
array->len,
|
||||||
|
sizeof (FlameRectangle),
|
||||||
|
(GCompareDataFunc)sort_by_coord,
|
||||||
|
NULL);
|
||||||
|
|
||||||
g_task_return_pointer (task, g_steal_pointer (&array), (GDestroyNotify)g_array_unref);
|
g_task_return_pointer (task, g_steal_pointer (&array), (GDestroyNotify)g_array_unref);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user