summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstaticstyle.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-02-11 18:55:17 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-05-17 23:24:32 -0400
commitde0c61754e0c339600b5b9eea25b363118c2da08 (patch)
tree9e8cedf4de471fdd73034889905ab5a270441796 /gtk/gtkcssstaticstyle.c
parent21a4fd1a5f8d21dff606b4c9d0fc7b1aa37223a5 (diff)
downloadgtk+-css-lookup-caching.tar.gz
Dump lookup statisticscss-lookup-caching
Print out numbers of lookups, their size, and the amount of sharing. For widget-factory, the numbers are like this: 319 different lookups, 890 total, 18.5022 avg length For the gtk-demo listbox example, the number are: 58 different lookups, 9742 total, 15.9997 avg length
Diffstat (limited to 'gtk/gtkcssstaticstyle.c')
-rw-r--r--gtk/gtkcssstaticstyle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkcssstaticstyle.c b/gtk/gtkcssstaticstyle.c
index a160de5f01..3546e2efef 100644
--- a/gtk/gtkcssstaticstyle.c
+++ b/gtk/gtkcssstaticstyle.c
@@ -996,6 +996,8 @@ gtk_css_static_style_new_compute (GtkStyleProvider *provider,
lookup,
change == 0 ? &change : NULL);
+ gtk_css_lookup_register (lookup);
+
if (_gtk_bitmask_is_empty (gtk_css_lookup_get_set_values (lookup)))
{
gtk_css_lookup_unref (lookup);