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.
This commit is contained in:
Alexander Larsson 2020-02-12 12:42:29 +01:00
parent 2890cd849f
commit e134eef505

View File

@ -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);
}
}