I have a virtual file system which is inherently slow because it uses the web service as a backend (Google Docs API).
It works great with one caveat: GTK applications use GtkFileChooser, which tries to determine the type of file content to display an icon or something else. When it encounters a file that it cannot recognize by extension, it reads the original piece of data to try to use it to determine the type of file. In my case, this leads to downloading the entire file from the network, which greatly slows down the list of directories in the file dialog.
It turns out that Gio (backend for GtkFileChooser) supports 2 modes for regularly detecting the content type (with the attribute 'standard :: content-type') and fast ('standard :: fast-content-type'), which only looks at the file extension . However, it seems that GtkFileChooser only asks for "standard :: content-type".
Is GTK always trying to use a slow algorithm to detect the type of content? Even for well-known slow file systems such as NFS?
Is it possible to mount my file system so that it uses only fast detection of the content type?
source share