diff options
author | Alexander Larsson <alexl@redhat.com> | 2020-02-12 12:42:29 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2020-02-12 12:42:29 +0100 |
commit | e134eef505f4770f41cfc94c97e48be5c6e5b6f4 (patch) | |
tree | 688e31bd9e28a39fad13d9d8162733131c2227f2 /gtk/gtkbuilderparser.c | |
parent | 2890cd849fd7d8e0cd73ed09a6bf0494dbafc8d5 (diff) | |
download | gtk+-e134eef505f4770f41cfc94c97e48be5c6e5b6f4.tar.gz |
builder: Don't add profiler marks for short parses
There are a lot of thes (since we're recursing), so don't spew the
output with uninteresting ones.
Diffstat (limited to 'gtk/gtkbuilderparser.c')
-rw-r--r-- | gtk/gtkbuilderparser.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index 1aea5c2799..5440100b7f 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -1625,5 +1625,10 @@ _gtk_builder_parser_parse_buffer (GtkBuilder *builder, /* restore the original domain */ gtk_builder_set_translation_domain (builder, domain); - gdk_profiler_end_mark (before, "builder load", filename); + if (GDK_PROFILER_IS_RUNNING) + { + guint64 after = g_get_monotonic_time (); + if (after - before > 500) + gdk_profiler_add_mark (before, after - before, "builder load", filename); + } } |