Commit 5732acde authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Improve performance for project loading

parent 57367f70
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <QSettings> #include <QSettings>
#include <QThread> #include <QThread>
#include <QTime> #include <QTime>
#include <QtConcurrentFilter>
#include <algorithm> #include <algorithm>
...@@ -283,13 +284,9 @@ void KateProjectWorker::loadFilesEntry(QStandardItem *parent, const QVariantMap ...@@ -283,13 +284,9 @@ void KateProjectWorker::loadFilesEntry(QStandardItem *parent, const QVariantMap
* sort out non-files * sort out non-files
* even for git, that just reports non-directories, we need to filter out e.g. sym-links to directories * even for git, that just reports non-directories, we need to filter out e.g. sym-links to directories
*/ */
files.erase(std::remove_if(files.begin(), QtConcurrent::blockingFilter(files, [](const QString &item) {
files.end(), return QFileInfo(item).isFile();
[](const QString &item) { });
return !QFileInfo(item).isFile();
}),
files.end());
/** /**
* we might end up with nothing to add at all * we might end up with nothing to add at all
*/ */
......
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