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 691589 - do not register empty strings as sound theme directories - fix slowdown of gnome-shell
do not register empty strings as sound theme directories - fix slowdown of gn...
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: plugins
3.7.x
Other Linux
: Normal major
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2013-01-12 03:16 UTC by Alban Browaeys
Modified: 2013-02-19 07:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
do not register empty string as a sound theme directory (1.34 KB, patch)
2013-01-12 03:16 UTC, Alban Browaeys
needs-work Details | Review
sound: Use glib to get the XDG dirs (2.30 KB, patch)
2013-01-12 18:19 UTC, Bastien Nocera
committed Details | Review

Description Alban Browaeys 2013-01-12 03:16:17 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).
Comment 1 Bastien Nocera 2013-01-12 12:59:25 UTC
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')
Comment 2 Matthias Clasen 2013-01-12 14:31:15 UTC
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
Comment 3 Bastien Nocera 2013-01-12 18:19:26 UTC
Created attachment 233313 [details] [review]
sound: Use glib to get the XDG dirs

Instead of processing the environment variables by hand.
Comment 4 Alban Browaeys 2013-01-12 18:52:18 UTC
Test went fine. No constant gvc update_client triggered in gnome-shell. Thanks.
Comment 5 Bastien Nocera 2013-01-12 21:14:06 UTC
Attachment 233313 [details] pushed as 6368c61 - sound: Use glib to get the XDG dirs
Comment 6 Bastien Nocera 2013-02-19 07:46:11 UTC
Pushed to gnome-3-6 as well.