After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 559162 - Improve performance logging annotations
Improve performance logging annotations
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2008-11-03 19:03 UTC by Behdad Esfahbod
Modified: 2008-11-03 21:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch (8.67 KB, patch)
2008-11-03 19:03 UTC, Behdad Esfahbod
committed Details | Review

Description Behdad Esfahbod 2008-11-03 19:03:15 UTC
patch coming.
Comment 1 Behdad Esfahbod 2008-11-03 19:03:32 UTC
Created attachment 121896 [details] [review]
The patch
Comment 2 Jens Granseuer 2008-11-03 20:25:35 UTC
+static void
+start_fontconfig_monitor (GnomeXSettingsManager  *manager)
+{
+        gnome_settings_profile_start (NULL);
+
+        manager->priv->fontconfig_handle = fontconfig_monitor_start ((GFunc) fontconfig_callback, manager);
+
+        gnome_settings_profile_end (NULL);
+}
+
+static void
+stop_fontconfig_monitor (GnomeXSettingsManager  *manager)
+{
+        fontconfig_monitor_stop (manager->priv->fontconfig_handle);
+        manager->priv->fontconfig_handle = NULL;
+}

That looks like overkill to me.

Also, indentation is messed up in lots of places.
Comment 3 Behdad Esfahbod 2008-11-03 20:50:52 UTC
(In reply to comment #2)
> +static void
> +start_fontconfig_monitor (GnomeXSettingsManager  *manager)
> +{
> +        gnome_settings_profile_start (NULL);
> +
> +        manager->priv->fontconfig_handle = fontconfig_monitor_start ((GFunc)
> fontconfig_callback, manager);
> +
> +        gnome_settings_profile_end (NULL);
> +}
> +
> +static void
> +stop_fontconfig_monitor (GnomeXSettingsManager  *manager)
> +{
> +        fontconfig_monitor_stop (manager->priv->fontconfig_handle);
> +        manager->priv->fontconfig_handle = NULL;
> +}
> 
> That looks like overkill to me.

The functions are static, so they are inlined anyway.  It's cleaner this way, specially after the patch in bug 559166 adds more logic to these functions.

> Also, indentation is messed up in lots of places.
> 

Comment 4 Behdad Esfahbod 2008-11-03 21:16:47 UTC
2008-11-03  Behdad Esfahbod  <behdad@gnome.org>

        * gnome-settings-daemon/gnome-settings-manager.c (_load_file):
        * gnome-settings-daemon/gnome-settings-plugin-info.c
        (gnome_settings_plugin_info_fill_from_file), (load_plugin_module):
        * plugins/font/gsd-font-manager.c (child_watch_cb),
        (spawn_with_input):
        * plugins/keyboard/gsd-keyboard-xkb.c (gsd_keyboard_xkb_init):
        * plugins/xrandr/gsd-xrandr-manager.c (gsd_xrandr_manager_start):
        * plugins/xsettings/gsd-xsettings-manager.c (child_watch_cb),
        (spawn_with_input), (start_fontconfig_monitor),
        (stop_fontconfig_monitor), (gnome_xsettings_manager_start),
        (gnome_xsettings_manager_stop):
        Improve performance logging annotations (bug #559162)