Bug 423500

Summary: KFileItemPrivate::determineMimeTypeHelper blocks gui thread
Product: [Frameworks and Libraries] frameworks-kio Reporter: Harald Sitter <sitter>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kdelibs-bugs, nate
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=178678
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 423082    

Description Harald Sitter 2020-06-25 13:49:32 UTC
When SkipMimeTypeFromContent wasn't explicitly set the determination will always use the content. This will block the gui thread if the item is on a mounted remote file system such as sshfs or cifs as reading may take a while depending on network bandwith/latency and remote IO bandwith/latency.

Supposedly a simple isSlow() and then using the SkipMimeTypeFromContent branch would help mitigate this. Alas, possibly a bit awkward since we currently don't have an enum value that'd represent "we'll do what feels sane" auto mode.