GNOME Bugzilla – Bug 673935
local-metadata: Sync calls fetching album art
Last modified: 2015-07-15 17:00:04 UTC
resolve_album_art() contains a sync call to g_file_test(). It should use g_file_query_exists() instead.
Also present in Filesystem plugin
(In reply to comment #0) > resolve_album_art() contains a sync call to g_file_test(). It should use > g_file_query_exists() instead. Why g_file_query_exists() is preferable over g_file_test()? Note that for g_file_query_exists(), I need to instantiate a GFile object just to perform the operation, and then free it because I don't need it anymore.
Make that g_file_query_info(), which will be async. And if you start thinking that g_file_new_... is a drag on performance, better stop using GObject altogether ;)
So, your suggestion is replacing g_file_test() (which is sync) by g_file_query_info_async() (which is async), not by g_file_query_exists(), which is a sync function too. In that case, then it makes sense.
Appears to have been fixed in eb546cbf "local-metadata: Use libmediaart" somewhere between 0.2.12 and 0.2.14 (Bug #724046). There's still some g_file_test() in other plugins, but not in local-metadata any more.