High cpu usage of setPersistentStoragePath
-
if __name__ == '__main__': import sys app = QApplication(sys.argv) views = [] for i in range(5): time.sleep(1) webview = QWebEngineView() profile = QWebEngineProfile(f"storage{i}", webview) profile.setPersistentStoragePath(f"profiles/storage{i}") webpage = QWebEnginePage(profile, webview) webview.setPage(webpage) webview.load(QUrl("https://www.google.com/")) webview.show() views.append(webview) sys.exit(app.exec())This is a test code I’ve written. My goal is to save cookies with minimal CPU usage.
The CPU usage is quite high, around 60–70%. Is that normal? Normal browsers use almost no CPU, so I’m wondering if there’s something I can do about it.
-
Hi and welcome to devnet,
Are you using PySide ? PyQt ?
Which version of it ?
On which OS ?
How did you install it ?
Which version of Python ?