webui: Linux WebView high CPU usage

When running webui with WebView as the browser the program ends in the following busy loop:

https://github.com/webui-dev/webui/blob/d5b25ca1a827d3ec07be9607232edb0c27172918/src/webui.c#L3099-L3101

This causes high CPU usage. Is there a reason why blocking = false is passed to gtk_main_iteration_do?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (11 by maintainers)

Most upvoted comments

I guess if blocking = true the websocket server will be blocked or something… you can easily test it to be sure. just change the line, and run make.

Aah ok. Just tested a little further. It does not seem this is the loop that causes 100% CPU usage. I just assumed (my bad)