Testing an app in which we’re using the WebBrowserComponent on Raspberry Pi OS (64-bit), which is based on Debian Bullseye 11.6, we noticed that CPU usage immediately rose to 100%
In trying to determine the cause, we’ve since tried building the JUCE DemoRunner from the JUCE GitHub Repository on two other sets of desktop hardware and different versions of Ubuntu:
11th Gen Intel(R) Core™ i7-1165G7 @ 2.80GHz (4 cores)
Ubuntu 22.10 (64-bit)
cmake version 3.24.2
Intel(R) Core™ i7-10750H CPU @ 2.60GHz (6 cores)
Ubuntu 22.04 (64-bit)
cmake version 3.24.3
While monitoring CPU usage in top on both of these machines, switching between the different demos results in different CPU usage e.g.
But WebBrowserDemo.h always jumps straight to 100%, regardless of web page content. Visiting a static site like https://www.google.com without any animation is the same.
Switching between Software and OpenGL rendering in settings doesn’t have any effect in DemoRunner for WebBrowserComponent.
Compiling and running under Windows 10 on System B doesn’t exhibit this problem and CPU usage for WebBrowserDemo.h is ~9%. Our understanding is that the WebBrowserComponent on Linux uses the WebKit2 engine (depending on libwebkit2gtk-4.0-dev) and that Windows uses something else. I’ve tried rebuilding the DemoRunner using libwebkit2gtk-4.1-dev too but no luck with that either.
We wondered if this could be OpenGL/WebGL related?