Trim DLLs used by glib on Windows
Sometime last year, Rust's stdlib removed its dependency on shell32.dll
because that pulls in a lot of DLLs (~15) including gdi32.dll
, which can cause large slowdowns: https://randomascii.wordpress.com/2018/12/03/a-not-called-function-can-cause-a-5x-slowdown/
We could try to do the same thing. It will improve performance, and it will reduce the DLLs loaded by console apps that use glib on Windows. According to one estimate, it halves the private memory usage of small console apps.
Here's an exhaustive list of all shell32 functions used by glib:
- glib:
SHGetSpecialFolderLocation
,SHGetPathFromIDListW
,CommandLineToArgvW
- gio:
SHFileOperationW
,SHGetFileInfoW
Thoughts?
Note that shell32
is completely deprecated with UWP (you cannot load it at all).