SHGetFileInfoW() is not reliable (time-wise)
GLib: master and 2.62.6
We have had a problem in GIMP for years, which is that GTK file widgets can be extra slow (like file dialogs). It happens for people with slow or unresponsive mounts (networks and the like), and even for people with non-existent partitions (a very common issue people seem to encounter is non-existent floppy drives, which seem to be active by default in the Bios, even on modern machines with not even a floppy drive slot). We are talking sometimes having to wait several minutes to see the file dialog to open.
Also this is not about opening a file in one of these drives (in such cases, of course, slow loading or even failures are acceptable), just opening a file dialog which is not even showing the contents of these drives by default.
After some investigation (mostly by @ell our optimization expert!), it seems the big culprit is
SHGetFileInfoW() where a lot of the time is spent. This is used in 2 places by GIO:
Basically these calls should either be replaced (but that assumes replacement functions exist in Win32 API and they don't have the same problem), or the calls should be made asynchronous. This last solution obviously will likely mean a change of API, so we are conscious this can be a bit of a blocker. But this issue has been a huge one in GTK+ application on Windows for years. So we believe it is worth it (if no replacement can be found).
Also I noticed #2006 where you were considering getting rid of this function too.