Review Request 127805: Backup Remote Files: Treat mounted files also as remote files
Christoph Cullmann
cullmann at kde.org
Thu May 26 14:41:36 UTC 2016
> On May 1, 2016, 11:30 p.m., Aleix Pol Gonzalez wrote:
> > src/document/katedocument.cpp, line 180
> > <https://git.reviewboard.kde.org/r/127805/diff/1/?file=462030#file462030line180>
> >
> > Maybe it would make sense to see what's the performance impact of this call `KMountPoint::currentMountPoints()`. It's potentially slow and it seems it can be called quite often.
Perhaps we should call it once and cache the result in a bool in the document until we change the url.
I think calling it once for the first save try wouldn't hurt?
- Christoph
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127805/#review95064
-----------------------------------------------------------
On May 1, 2016, 7:35 p.m., Dominik Haumann wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127805/
> -----------------------------------------------------------
>
> (Updated May 1, 2016, 7:35 p.m.)
>
>
> Review request for Kate, KDE Frameworks and Christoph Cullmann.
>
>
> Bugs: 362288
> https://bugs.kde.org/show_bug.cgi?id=362288
>
>
> Repository: ktexteditor
>
>
> Description
> -------
>
> When backup-remote-files is enabled, QUrl::isLocalFile() is used. However, isLocalFile() also returns true for files that are locally mounted (e.g. nfs, sshfs, ...).
>
> This patch uses KMountPoint::probablySlow() such that mounted remote files are also treated as "true" remote files.
>
> However, KMountPoint::probablySlow() right now only checks the filesystem for nfs, cifs, autofs, or subfs, see:
> http://api.kde.org/frameworks-api/apidox-frameworks/frameworks5-apidocs/kio/html/kmountpoint_8cpp_source.html#l00535
>
> So in addition to this patch, we may need to extend KMountPoint::probablySlow() to also return true for e.g. sshfs or similar common remote filessytems.
>
> When reviewing the patch, please note, that katedocument.cpp also still often uses QUrl::isLocalFile(). These usages are still correct, afaics.
>
>
> Diffs
> -----
>
> src/document/katedocument.cpp d552b45
>
> Diff: https://git.reviewboard.kde.org/r/127805/diff/
>
>
> Testing
> -------
>
> Compiles.
>
>
> Thanks,
>
> Dominik Haumann
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160526/dac7987d/attachment.html>
More information about the Kde-frameworks-devel
mailing list