summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-04-02 08:24:01 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-04-02 09:02:05 -0400
commita9b4ac3d59f2e95a647cb9ce09fb4204cfe93c9b (patch)
tree086234c186029ce357926e76774f5e349ce9e15f /gtk/gtkimcontextsimple.c
parentfcd36e59b12c9c476e3882bea6b0f51eafacd864 (diff)
downloadgtk+-a9b4ac3d59f2e95a647cb9ce09fb4204cfe93c9b.tar.gz
imcontextsimple: Add a profiler mark for IO
We are loading a file here, thankfully in a thread, but we do it every time an entry is created. Add a profiler mark, to make this visible.
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index a96b3f0646..51229a54dc 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -44,6 +44,7 @@
#include "gtkimcontextsimpleprivate.h"
#include "gtkimcontextsimpleseqs.h"
+#include "gdk/gdkprofilerprivate.h"
/**
* SECTION:gtkimcontextsimple
@@ -244,12 +245,17 @@ init_compose_table_thread_cb (GTask *task,
gpointer task_data,
GCancellable *cancellable)
{
+ guint64 before = g_get_monotonic_time ();
+
if (g_task_return_error_if_cancelled (task))
return;
g_return_if_fail (GTK_IS_IM_CONTEXT_SIMPLE (task_data));
gtk_im_context_simple_init_compose_table (GTK_IM_CONTEXT_SIMPLE (task_data));
+
+ if (GDK_PROFILER_IS_RUNNING)
+ gdk_profiler_end_mark (before, "im compose table load (thread)", NULL);
}
static void