mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 00:14:09 +00:00

When creating paint nodes, various names are attached to the node to simplify debugging. These strings are g_strdup()d and g_free()d quite frequently. For example, a minute of GNOME Shell use resulted in nearly .5 MiB of string duplications and frees. All uses within the code-base have access to a static string, so we can just use that instead and take the hit of g_intern_string() for any extensions that would be using the existing clutter_paint_node_set_name() API for backwards compatibility. https://gitlab.gnome.org/GNOME/mutter/merge_requests/1081