GNOME Bugzilla – Bug 691589
do not register empty strings as sound theme directories - fix slowdown of gnome-shell
Last modified: 2013-02-19 07:46:11 UTC
Created attachment 233291 [details] [review] do not register empty string as a sound theme directory With two colons following in XDG_DATA_DIRS, ie nameA:nameB::nameC, the sound plugin register this :: spliited as "" empty string as if a theme directory. Follows constants pulseaudio client updates: (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136297 name='gnome-settings-daemon' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136299 name='Native client (UNIX socket client)' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136299 name='gnome-settings-daemon' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136301 name='Native client (UNIX socket client)' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136302 name='Native client (UNIX socket client)' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136302 name='gnome-settings-daemon' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136303 name='Native client (UNIX socket client)' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136303 name='gnome-settings-daemon' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136304 name='Native client (UNIX socket client)' (gnome-shell:8514): Gvc-DEBUG: Updating client: index=136304 name='gnome-settings-daemon' which slow down runtime and on inactivity piles up and resume on activity all at the same time (to add to the time it takes to gnome-shell gvc to get back running, those calls of gvc update client all fails , which takes minutes).
Review of attachment 233291 [details] [review]: I think you should explain that monitoring "" will make it monitor the current directory, usually the home dir. ::: plugins/sound/gsd-sound-manager.c @@ +288,2 @@ for (k = ps; *k; ++k) + if (g_strcmp0 ("", *k) != 0) I prefer: if (*k != '\0')
Why is this code manually parsing the env vars in the first place ? Could just use g_get_user_data_dir / g_get_system_data_dirs
Created attachment 233313 [details] [review] sound: Use glib to get the XDG dirs Instead of processing the environment variables by hand.
Test went fine. No constant gvc update_client triggered in gnome-shell. Thanks.
Attachment 233313 [details] pushed as 6368c61 - sound: Use glib to get the XDG dirs
Pushed to gnome-3-6 as well.