eric7/DataViews/PyProfileDialog.py

branch
eric7
changeset 8943
23f9c7b9e18e
parent 8881
54e42bc2437a
--- a/eric7/DataViews/PyProfileDialog.py	Mon Feb 07 22:02:35 2022 +0100
+++ b/eric7/DataViews/PyProfileDialog.py	Tue Feb 08 16:21:09 2022 +0100
@@ -9,6 +9,7 @@
 
 import os
 import pickle       # secok
+import time
 
 from PyQt6.QtCore import Qt
 from PyQt6.QtWidgets import (
@@ -173,6 +174,7 @@
             self.resultList.setSortingEnabled(False)
             
             # now go through all the files
+            now = time.monotonic()
             for progress, (func, (cc, nc, tt, ct, _callers)) in enumerate(
                 list(self.stats.items()), start=1
             ):
@@ -212,7 +214,9 @@
                                             func[1], func[2])
                     
                 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)

eric ide

mercurial