forked from AuroraMiddleware/gtk
Add profiler marks around css selector tree building
This is a big part of theme loading, and worth showing in traces.
This commit is contained in:
parent
3483c1a45b
commit
f5865b125e
@ -967,6 +967,7 @@ gtk_css_provider_postprocess (GtkCssProvider *css_provider)
|
|||||||
GtkCssProviderPrivate *priv = gtk_css_provider_get_instance_private (css_provider);
|
GtkCssProviderPrivate *priv = gtk_css_provider_get_instance_private (css_provider);
|
||||||
GtkCssSelectorTreeBuilder *builder;
|
GtkCssSelectorTreeBuilder *builder;
|
||||||
guint i;
|
guint i;
|
||||||
|
gint64 before = g_get_monotonic_time ();
|
||||||
|
|
||||||
g_array_sort (priv->rulesets, gtk_css_provider_compare_rule);
|
g_array_sort (priv->rulesets, gtk_css_provider_compare_rule);
|
||||||
|
|
||||||
@ -997,6 +998,9 @@ gtk_css_provider_postprocess (GtkCssProvider *css_provider)
|
|||||||
ruleset->selector = NULL;
|
ruleset->selector = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (gdk_profiler_is_running ())
|
||||||
|
gdk_profiler_add_mark (before * 1000, (g_get_monotonic_time () - before) * 1000, "create selector tree", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user