--- a/eric7/DataViews/CodeMetricsDialog.py Thu Jan 27 17:54:11 2022 +0100 +++ b/eric7/DataViews/CodeMetricsDialog.py Sat Jan 29 17:43:20 2022 +0100 @@ -7,9 +7,10 @@ Module implementing a code metrics dialog. """ -import os +import collections import fnmatch -import collections +import os +import time from PyQt6.QtCore import pyqtSlot, Qt, QLocale from PyQt6.QtWidgets import ( @@ -175,6 +176,7 @@ self.resultList.setSortingEnabled(False) # now go through all the files + now = time.monotonic() for progress, file in enumerate(files, start=1): if self.cancelled: return @@ -192,7 +194,9 @@ self.resultList.expandItem(fitm) self.checkProgress.setValue(progress) - QApplication.processEvents() + if time.monotonic() - now > 0.01: + QApplication.processEvents() + now = time.monotonic() finally: # reenable updates of the list self.resultList.setSortingEnabled(True)