浏览代码

ENH: Speed up ctkDICOMBrowser removing processEvents call

This commit removes call to "processEvents()" initially added
in cce76a9 (New ctkDICOMBrowser including a new example application
ctkDICOM2).

This call added extra overhead and was causing a x2 slowdown when
importing large collection of DICOMs. In our example, importing
556 files was taking ~8s and without this function call, time was reduced
to 3.5s.

We also observed that canceling the import process is still possible.
Jean-Christophe Fillion-Robin 7 年之前
父节点
当前提交
11e0f6a9e6
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0 4
      Libs/DICOM/Widgets/ctkDICOMBrowser.cpp

+ 0 - 4
Libs/DICOM/Widgets/ctkDICOMBrowser.cpp

@@ -423,11 +423,7 @@ ctkDICOMTableManager* ctkDICOMBrowser::dicomTableManager()
 //----------------------------------------------------------------------------
 void ctkDICOMBrowser::onFileIndexed(const QString& filePath)
 {
-  // Update the progress dialog when the file name changes
-  // - also allows for cancel button
-  QCoreApplication::instance()->processEvents();
   qDebug() << "Indexing \n\n\n\n" << filePath <<"\n\n\n";
-  
 }
 
 //----------------------------------------------------------------------------