Browse Source

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 years ago
parent
commit
11e0f6a9e6
1 changed files with 0 additions and 4 deletions
  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";
-  
 }
 
 //----------------------------------------------------------------------------