Details
-
Suggestion
-
Resolution: Fixed
-
P1: Critical
-
None
-
5.15.8, 6.3.0 Beta1
Description
See attached HTML file and attached animation. On my machine with Intel i7-7700, when Google Chrome and Microsoft Edge load the attached file, their CPU usage hovers between 1%-2%; in contrast, Qt WebEngine hovers over 10% (>5x difference).
There appears to be 2 parts to this issue.
Part 1: Hardware-accelerated rasterization is disabled in most cases
This is due to http://crbug.com/1047002.
Chrome and Edge always use ANGLE on Windows, whereas Qt WebEngine inherits the OpenGL settings of the main Qt app.
In Qt 5, we can force the ANGLE backend which dramatically reduces CPU usage. However, ANGLE support was removed in Qt 6: https://doc.qt.io/qt-6/opengl-changes-qt6.html#removal-of-angle
Part 2: Sub-optimal implementation?
Even if Qt WebEngine's hardware rasterization is enabled via ANGLE, or even if Chrome is running on a machine which only has Mesa/llvmpipe, the CPU usage from Qt WebEngine is still consistently a few percentage points higher than Chrome.
Interestingly, simply applying --disable-gpu to Chrome does not cause an increase in CPU usage when hardware rasterization was previously available.
Suggestions
- Document the performance boost that ANGLE can provide to Qt 5
- Find another way to enable hardware rasterization in Qt 6
- Investigate why Qt WebEngine doesn't perform as well as Chrome/Edge