mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
StTextureCache: do not monitor files inside GResource
This is wasteful, since GResource does not support file monitoring. Further, doing so will trigger a fallback code path in GLib that polls every second in a thread, which is doubly wasteful. https://bugzilla.gnome.org/show_bug.cgi?id=744013
This commit is contained in:
parent
c647be375a
commit
12b00501cc
1 changed files with 6 additions and 0 deletions
|
|
@ -983,6 +983,12 @@ ensure_monitor_for_file (StTextureCache *cache,
|
|||
{
|
||||
StTextureCachePrivate *priv = cache->priv;
|
||||
|
||||
/* No point in trying to monitor files that are part of a
|
||||
* GResource, since it does not support file monitoring.
|
||||
*/
|
||||
if (g_file_has_uri_scheme (file, "resource"))
|
||||
return;
|
||||
|
||||
if (g_hash_table_lookup (priv->file_monitors, file) == NULL)
|
||||
{
|
||||
GFileMonitor *monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue