Commit 7aeedc44 authored by Bharadwaj Raju's avatar Bharadwaj Raju 📚 Committed by Méven Car
Browse files

Skip slow files

Skips files which are slow according to `KFileItem::isSlow()`. Makes browsing local mounts of remote filesystems (like with rclone) much faster.

BUG: 423501
parent 8c77dc16
Pipeline #133172 passed with stage
in 41 seconds
......@@ -149,7 +149,7 @@ void FileMetaDataProvider::insertSingleFileBasicData()
KFormat format;
if (item.isDir()) {
bool isSizeUnknown = !item.isLocalFile();
bool isSizeUnknown = !item.isLocalFile() || item.isSlow();
if (!isSizeUnknown) {
const QPair<int, int> counts = subDirectoriesCount(item.url().path());
const int count = counts.first;
......@@ -243,7 +243,7 @@ void FileMetaDataProvider::insertFilesListBasicData()
int hiddenCount = 0;
bool isSizeKnown = true;
for (const KFileItem &item : qAsConst(m_fileItems)) {
isSizeKnown = item.isLocalFile();
isSizeKnown = item.isLocalFile() && !item.isSlow();
if (!isSizeKnown) {
return;
}
......@@ -355,7 +355,7 @@ void FileMetaDataProvider::setFileItem()
//
insertSingleFileBasicData();
const QUrl url = m_fileItems.first().targetUrl();
if (!url.isLocalFile()) {
if (!url.isLocalFile() || m_fileItems.first().isSlow()) {
// FIXME - are extended attributes supported for remote files?
m_readOnly = true;
Q_EMIT loadingFinished();
......@@ -391,7 +391,7 @@ void FileMetaDataProvider::setFileItems()
// it would be too expensive otherwise.
for (const KFileItem &item : qAsConst(m_fileItems)) {
const QUrl url = item.targetUrl();
if (url.isLocalFile()) {
if (url.isLocalFile() && !item.isSlow()) {
urls << url.toLocalFile();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment