Skip to content

Wip/jehan/issue 2096 SHGetFileInfoW()

Jehan requested to merge Jehan/glib:wip/Jehan/issue-2096-SHGetFileInfoW into master

Fixes #2096 (closed). This is a problem we have had for GIMP on Windows since eons. Some people had up to minutes of GUI freeze when opening file dialogs (often because of problematic mounts, but still this should not freeze the whole program).

So basically SHGetFileInfoW() should never be run in the main thread (as is also written in Microsoft docs), and even then only when the info it is querying is actually requested by the calling program (i.e. not in the constructor). It is just too expensive.

I also have a patch ready for GTK+ so that it still gets the nice mount names on Windows (on Linux it won't change a thing).

Merge request reports