Bug 423532

Summary: PreviewJob to apply remote maxSize to mounted remotes?
Product: [Frameworks and Libraries] frameworks-kio Reporter: Harald Sitter <sitter>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kdelibs-bugs
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-26 08:58:44 UTC
Right now we only apply the remote max size setting to items that are isLocalFile() or for which their protocol is :local. The trouble is that just because a path is local doesn't mean that the filesystem is. Which makes e.g. an sshfs mount both technically and practically a "remote" meaning the size constraints applied to remotes should apply to mounted remotes as well.

Making this change would mean, by default, previews are off for mounted remotes as well, reducing the risk of bottlenecking the remotes with preview related IO. And of course users can then also opt to have previews enabled, albeit at a lower cut off point than for local files.

This would help to reduce the risk of bugs like bug #423082 and bug #178678 happening. They are a general type of issue where our code easily can fall into the trap that a local path means we can use local synchronous IO API when in fact that means the GUI thread will block until we got a reply from the remote. By not drowning the remote with previews there is more bandwidth to accommodate blocking stat() calls and the like.