D26407: KFileItem: Improve isSlow to not block when a network mount is unresponsive, make SkipMimeTypeFromContent skip only on slow fs

Méven Car noreply at phabricator.kde.org
Tue Jan 14 14:23:51 GMT 2020


meven added a comment.


  I am thinking about adding some api to check status of nfs, sftp or smb mounts by checking their hostname network reachability, to complement isSlow(), and perhaps then running a stat of the mount with a timeout.
  This would be kept in a cache with a short duration.
  We still need this because we will lack icons for network files and folders as long as we skip mimetype checking solely on fs type.
  And this would allow to make this check default and remove m_bSkipMimeTypeFromContent at this point.

INLINE COMMENTS

> dfaure wrote in kfileitem.cpp:787
> OK, but I still read "can only mean" like a possibly incorrect assumption.
> 
> I suggest s/can only mean/for instance/

I meant this and this what KMountPoint does, better be precise here.

> dfaure wrote in kfileitem.cpp:1246
> Did you mean || ?
> 
> Otherwise this changes the behaviour also on fast local paths (when SkipMimeTypeFromContent is set).
> 
> Then again, D19887 <https://phabricator.kde.org/D19887> (which introduced this if) was apparently about network mounts.

I meant to change the behavior : this isSlow check would be triggered only when m_bSkipMimeTypeFromContent is set  or I will create regression in Dolphin for instance where icons for folders in network mount would disappear.

> dfaure wrote in kmountpoint.h:66
> I don't really like the name, it's non-obvious until reading the documentation.
> Maybe it should be findByPath(path, KMountPoint::DontResolveSymlinks) ?
> (with a 2-args findByPath overload and a KF6 TODO to merge the two)

Nice suggestion !

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D26407

To: meven, #frameworks, ngraham, broulik, dfaure
Cc: anthonyfieroni, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200114/b2006410/attachment.html>


More information about the Kde-frameworks-devel mailing list