GNOME Bugzilla – Bug 744010
g_file_monitor_file on a GResourceFile results in polling
Last modified: 2015-08-21 04:03:23 UTC
For a variety of reasons, we ended up using g_file_monitor_file on a GResource file. This results in starting a new thread every second to query if the file changed its etag (it didn't) and then shut down. This is surprisingly expensive on low-power ARM devices where we're locked in a mutex the entire time waiting for new info to come in. We should have a special case in g_resource_file_monitor_file that supplies a dummy file monitor since we know the file can't ever change. Additionally, there's no way to test if a file is a GResource or if it can change.
I've added a dummy file monitor to GResourceFile, and I've implemented the following filesystem attributes: type: resource readonly: true That should let you identify resource files