Git commit 6860ae125805e2c3ec47c4bed4ca0a453734cfd2 by Milian Wolff. Committed on 31/01/2016 at 22:51. Pushed by mwolff into branch '5.0'. Extend FileManagerListJob timing debug code. This adds per-job timing as well which I just needed to get more insight as to why these list jobs tend to take a very long time in KDevelop. M +13 -1 project/filemanagerlistjob.cpp M +2 -0 project/filemanagerlistjob.h http://commits.kde.org/kdevplatform/6860ae125805e2c3ec47c4bed4ca0a453734cfd2 diff --git a/project/filemanagerlistjob.cpp b/project/filemanagerlistjob.cpp index 1cf2dc9..f45d4b5 100644 --- a/project/filemanagerlistjob.cpp +++ b/project/filemanagerlistjob.cpp @@ -73,6 +73,10 @@ void FileManagerListJob::startNextJob() return; } = +#ifdef TIME_IMPORT_JOB + m_subTimer.start(); +#endif + m_item =3D m_listQueue.dequeue(); KIO::ListJob* job =3D KIO::listDir( m_item->path().toUrl(), KIO::HideP= rogressInfo ); job->setParentJob( this ); @@ -87,6 +91,14 @@ void FileManagerListJob::slotResult(KJob* job) return; } = +#ifdef TIME_IMPORT_JOB + { + auto waited =3D m_subTimer.elapsed(); + m_subWaited +=3D waited; + qDebug() << "TIME FOR SUB JOB:" << waited << m_subWaited; + } +#endif + emit entries(this, m_item, entryList); entryList.clear(); = @@ -98,7 +110,7 @@ void FileManagerListJob::slotResult(KJob* job) emitResult(); = #ifdef TIME_IMPORT_JOB - qCDebug(FILEMANAGER) << "TIME FOR LISTJOB:" << m_timer.elapsed(); + qDebug() << "TIME FOR LISTJOB:" << m_timer.elapsed(); #endif } else { emit nextJob(); diff --git a/project/filemanagerlistjob.h b/project/filemanagerlistjob.h index 279f637..fbbe986 100644 --- a/project/filemanagerlistjob.h +++ b/project/filemanagerlistjob.h @@ -68,6 +68,8 @@ private: = #ifdef TIME_IMPORT_JOB QElapsedTimer m_timer; + QElapsedTimer m_subTimer; + qint64 m_subWaited =3D 0; #endif }; =