Skip to content
Discussion options

You must be logged in to vote

For memory that grows over days, I'd measure before changing anything. The growth could come from the frontend, your Python code, the bridge between them, or the webview runtime itself, so it's worth checking each one separately. A few ways to do that:

  • Run with webview.start(debug=True) to get devtools, then take heap snapshots a few hours apart and compare what's accumulating. Common suspects include event listeners that never get removed, setInterval timers, and arrays or caches that keep growing, but the snapshots will confirm it.
  • Track the Python process's memory separately from the webview processes, especially if you call Python from JS through js_api.
  • If you're on WebView2, Micros…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ronnifadhlillah
Comment options

Comment options

You must be logged in to vote
1 reply
@ronnifadhlillah
Comment options

Answer selected by ronnifadhlillah
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants