D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-04 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > meven wrote in kfileitem.cpp:783 > At least the mnttab reading business in KMountPoint::currentMountPoints is > saved. Yes, but the "never blocks" claim in the commit message is misleading. REPOSITORY R241 KIO REVISION DETAIL

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-04 Thread Méven Car
meven added inline comments. INLINE COMMENTS > broulik wrote in kfileitem.cpp:783 > This creates a `QFileInfo` for `canonicalFilePath` which blocks, so the cache > doesn't help at all. At least the mnttab reading business in KMountPoint::currentMountPoints is saved. > anthonyfieroni wrote in

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-04 Thread Kai Uwe Broulik
broulik added inline comments. INLINE COMMENTS > kfileitem.cpp:783 > +const auto = getMountPoints(); > +auto mp = mountPoints.findByPath(path); > +if (mp) { This creates a `QFileInfo` for `canonicalFilePath` which blocks, so the cache doesn't help at all.

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-04 Thread Anthony Fieroni
anthonyfieroni added inline comments. INLINE COMMENTS > kfileitem.cpp:49-50 > + */ > +static KMountPoint::List mountPoints; > +static QDateTime lastMountPointUpdate; > + Put them in `getMountPoints` as local static variables, global static are no-go. > dfaure wrote in kfileitem.cpp:787 > This

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-04 Thread David Faure
dfaure added inline comments. INLINE COMMENTS > kfileitem.cpp:787 > +} else { > +// if no mount point was found, can only mean we are on > android > +m_slow = Fast; This is not really true. We have that problem in the FreeBSD CI, where there's no

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-04 Thread Méven Car
meven marked 3 inline comments as done. 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

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-04 Thread Méven Car
meven updated this revision to Diff 72732. meven added a comment. Address review, don't commit at 1 a.m REPOSITORY R241 KIO CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26407?vs=72720=72732 BRANCH arcpatch-D26407 REVISION DETAIL https://phabricator.kde.org/D26407

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-03 Thread Anthony Fieroni
anthonyfieroni added inline comments. INLINE COMMENTS > kfileitem.cpp:782 > if (!path.isEmpty()) { > -const KFileSystemType::Type fsType = > KFileSystemType::fileSystemType(path); > -m_slow = (fsType == KFileSystemType::Nfs || fsType == > KFileSystemType::Smb)

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-03 Thread Nathaniel Graham
ngraham added reviewers: broulik, dfaure. ngraham added inline comments. INLINE COMMENTS > kfileitem.cpp:47 > +/** > + * A coche of currently mounted filesystems > + */ cache > kfileitem.cpp:1245 > > -if (d->m_bSkipMimeTypeFromContent) { > +// avoid potential bloqing stat on network

D26407: KFileItem: improve isSlow to never block, make SkipMimeTypeFromContent skip only network fs

2020-01-03 Thread Méven Car
meven created this revision. meven added reviewers: Frameworks, ngraham. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. meven requested review of this revision. REVISION SUMMARY Alternative to D23198 BUG: 401579