GNOME Bugzilla – Bug 117869
gnome_vfs_url_show can hang apps
Last modified: 2004-12-22 21:47:04 UTC
Since it does sync i/o, gnome_vfs_url_show can hang apps while it tries to determine the mime_type of a remote file. In most cases this hang is only a few seconds (on dialup at least) but it is still very user noticeable. Anyway perhaps not-related to this exact issue would be a request for an async api along with a way to cancel the operation. What i'm thinking is that I can popup a dialog informing the user that url is being loaded while vfs is sniffing the mime_type and the user can hit cancel to cancel the operation if they choose. (obviously not worded that way but you know...)
This is not an enhancement. gnome_url_show can potentially hang an application for an undefinite amount of time (if network is down for example), and I don't think that's acceptable. If it's not fixed, it at least needs to be made explicit in the API docs and some non blocking function must also be provided (for example an async one, or one which does not do mime sniffing, but only use the file name to determine the mime type)
I don't think a only using a the filename variant would really be useful. I guess imo this function needs to be generic, you provide it a url it shows it, the application need not worry about it. I guess in the name pragmitism (sic?) you could limit mime-sniffing to only local files, although as I mentioned before mime-sniffing doesn't take that long on dialup (for the most part i've had exceptions), the problem is that the function blocks the ui of the caller.
In practice i think this problem went away when we added http/https url handlers. However, we should make gnome-vfs timeout after a while. Infinite blocking isn't good.