Qt6.3 Webengine performance Probleme
-
Hallo,
wir haben Qt6.3 via Buildroot inkl. Webengine mit Buildroot gebaut.
Die WebEngine braucht nur sehr lange eine Seite zu rendern bzw. auszuführen. Dadurch wird fast jede Webseite extrem langsam und ruckelig.Beispielsweise dauert das laden der Youtube Startseite insgesamt etwa 60 bis 80 Sekunden und lässt die CPU lasst (avg bei 4 kernen) auf bis zu 75% steigen.
Beim Laden der Google Startseite geht die CPU auf bis zu 40%. Ein suche zu starten bis 50% und beim einfachen scrollen der Suchergebnisse ebenso.
Im folgendem Screenshots der network performance aus dem RemoteDebugger für das laden der Youtube Startseite. Diese ist hier zwar nach 40s geladen, wird aber erst nach ca. 80 Sekunden vollständig angezeigt. Man kann hier einen Engpass beim „Skripting“ erkennen, welches zusammen um die ~38 sekunden benötigt.
Mit selbiger Hardware, aber Qt 5.15.2 für Python (PySide) haben wir diese Probleme nicht.
Das Zielsystem hat entweder ein Congatec IA4 oder Congatec IA5 Board.
Das IA4 Board hat eine Intel Celeron CPU N3160 @ 1.60GHz mit integrierter Gen 8 HD Graphics GPU
Das IA5 Board hat eine Intel Pentium N4200 @ 1.10Ghz mit integrierter Gen 9 HD Graphics GPUBuildroot:
- Architektur: x86_64 (Core i7)
- C Library: glibC
- Kernel: 4.19.176
- QT6 ist für xcb konfiguriert.
Im folgenden die config.summarys:
- qt6base
Building for: linux-g++ (x86_64, CPU features: cx16 mmx popcnt sse sse2 sse3 ssse3 sse4.1 sse4.2 sse4) Compiler: gcc 10.3.0 Build options: Mode ................................... debug Optimize debug build ................... no Fully optimize release builds (-O3) .... no Building shared libraries .............. yes Using C standard ....................... C11 Using C++ standard ..................... C++17 Using ccache ........................... no Using new DTAGS ........................ yes Generating GDB index ................... no Relocatable ............................ yes Using precompiled headers .............. no Using LTCG ............................. no Target compiler supports: SSE .................................. SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX .................................. <none> AVX512 ............................... <none> Other x86 ............................ AES RDRAND SHA Intrinsics without compiler architecture option yes Sanitizers: Addresses ............................ no Threads .............................. no Memory ............................... no Fuzzer (instrumentation only) ........ no Undefined ............................ no Build parts ............................ libs Qt modules and options: Qt Concurrent .......................... yes Qt D-Bus ............................... yes Qt D-Bus directly linked to libdbus .... yes Qt Gui ................................. yes Qt Network ............................. yes Qt PrintSupport ........................ yes Qt Sql ................................. no Qt Testlib ............................. yes Qt Widgets ............................. yes Qt Xml ................................. yes Support enabled for: Using pkg-config ....................... yes udev ................................... yes Using system zlib ...................... yes Zstandard support ...................... no Thread support ......................... yes Common build options: Linker can resolve circular dependencies yes Qt Core: backtrace .............................. yes DoubleConversion ....................... yes Using system DoubleConversion ........ no GLib ................................... yes ICU .................................... yes Using system libb2 ..................... no Built-in copy of the MIME database ..... yes Tracing backend ........................ <none> Logging backends: journald ............................. no syslog ............................... no slog2 ................................ no PCRE2 .................................. yes Using system PCRE2 ................... yes CLONE_PIDFD support in forkfd .......... yes Qt Network: getifaddrs() ........................... yes IPv6 ifname ............................ yes libproxy ............................... no Linux AF_NETLINK ....................... yes OpenSSL ................................ yes Qt directly linked to OpenSSL ........ no OpenSSL 1.1 ............................ yes DTLS ................................... yes OCSP-stapling .......................... yes SCTP ................................... no Use system proxies ..................... yes GSSAPI ................................. no Brotli Decompression Support ........... no Qt Gui: Accessibility .......................... yes FreeType ............................... yes Using system FreeType ................ yes HarfBuzz ............................... yes Using system HarfBuzz ................ yes Fontconfig ............................. yes Image formats: GIF .................................. no ICO .................................. yes JPEG ................................. yes Using system libjpeg ............... yes PNG .................................. yes Using system libpng ................ yes Text formats: HtmlParser ........................... yes CssParser ............................ yes OdfWriter ............................ yes MarkdownReader ....................... yes Using system libmd4c ............... no MarkdownWriter ....................... yes EGL .................................... yes OpenVG ................................. no OpenGL: Desktop OpenGL ....................... yes OpenGL ES 2.0 ........................ no OpenGL ES 3.0 ........................ no OpenGL ES 3.1 ........................ no OpenGL ES 3.2 ........................ no Vulkan ................................. no Session Management ..................... yes Features used by QPA backends: evdev .................................. yes libinput ............................... yes INTEGRITY HID .......................... no mtdev .................................. yes tslib .................................. no xkbcommon .............................. yes X11 specific: XLib ................................. yes XCB Xlib ............................. yes EGL on X11 ........................... yes xkbcommon-x11 ........................ yes xcb-sm ............................... yes QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... yes EGLFS GBM ............................ yes EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ yes LinuxFB ................................ no VNC .................................... yes VK_KHR_display ......................... no QNX: lgmon ................................ no IMF .................................. no XCB: Using system-provided xcb-xinput ..... yes GL integrations: GLX Plugin ......................... yes XCB GLX .......................... yes EGL-X11 Plugin ..................... yes Windows: Direct 2D ............................ no Direct 2D 1.1 ........................ no DirectWrite .......................... no DirectWrite 3 ........................ no Qt Widgets: GTK+ ................................... no Styles ................................. Fusion Windows Qt Testlib: Tester for item models ................. yes Qt PrintSupport: CUPS ................................... no Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.
- qt6webengine:
WebEngine Repository Build Options: Build Ninja ............................ no Build Gn ............................... no Jumbo Build ............................ yes Developer build ........................ no Build QtWebEngine Modules: Build QtWebEngineCore ................ yes Build QtWebEngineWidgets ............. yes Build QtWebEngineQuick ............... yes Build QtPdf Modules: Build QtPdfWidgets ................... no Build QtPdfQuick ..................... no Optional system libraries: re2 .................................. no icu .................................. no libwebp, libwebpmux and libwebpdemux . yes opus ................................. yes ffmpeg ............................... yes libvpx ............................... yes snappy ............................... no glib ................................. yes zlib ................................. yes minizip .............................. no libevent ............................. no libxml2 and libxslt .................. no lcms2 ................................ no png .................................. yes jpeg ................................. yes harfbuzz ............................. yes freetype ............................. yes libpci ............................... no Qt WebEngineCore: Embedded build ......................... yes Full debug information ................. no Sanitizer support ...................... no Pepper Plugins ......................... no Printing and PDF ....................... no Proprietary Codecs ..................... no Spellchecker ........................... no Native Spellchecker .................... no WebRTC ................................. no PipeWire over GIO ...................... no Geolocation ............................ yes WebChannel support ..................... yes Kerberos Authentication ................ no Extensions ............................. no Support GLX on qpa-xcb ................. yes Use ALSA ............................... yes Use PulseAudio ......................... no Qt WebEngineQuick: UI Delegates ........................... yes
- qt6declarative
Qt QML: QML network support .................... yes QML debugging and profiling support .... yes QML just-in-time compiler .............. yes QML sequence object .................... yes QML XML http request ................... yes QML Locale ............................. yes Qt QML Models: QML list model ......................... yes QML delegate model ..................... yes Qt Quick: AnimatedImage item ..................... yes Canvas item ............................ yes Support for Qt Quick Designer .......... yes Flipable item .......................... yes GridView item .......................... yes ListView item .......................... yes TableView item ......................... yes Path support ........................... yes PathView item .......................... yes Positioner items ....................... yes Repeater item .......................... yes ShaderEffect item ...................... yes Sprite item ............................ yes Qt Quick Templates 2: Hover support .......................... yes Multi-touch support .................... yes Qt Quick Controls 2: Styles ................................. Basic Fusion Imagine Material Universal macOS Windows
- qt6multimedia:
Qt Multimedia: GStreamer 1.0 .......................... yes Video for Linux ........................ yes Linux DMA buffer support ............... yes MMRenderer ............................. no AVFoundation ........................... no Windows Media Foundation ............... no
- qt6tools
Qt Tools: Qt Assistant ........................... no QDoc ................................... no Clang-based lupdate parser ............. no Qt Designer ............................ yes Qt Distance Field Generator ............ no Qt Linguist ............................ yes Mac Deployment Tool .................... no pixeltool .............................. no qdbus .................................. no Qt Attributions Scanner ................ no qtdiag ................................. no qtplugininfo ........................... no Windows deployment tool ................ no WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation. Either set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation. On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution. On macOS, you can use Homebrew's llvm package. You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check. WARNING: Clang-based lupdate parser will not be available. LLVM and Clang C++ libraries have not been found. You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.
- qtremoteobjects
Qt Remote Objects: High Availability Manager (ham) ........ no
Der Webbrowser an sich ist der QuickNanoBrowser aus den QT-Beispielen.
Ich habe folgende Startargumente für den Webbrowser ausprobiert:
--ignore-gpu-blocklist --enable-gpu-rasterization --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder
Dadurch laden die Grafiken etwas schneller. Das große performance Problem löst dies allerdings nicht.
Beim laden verschiedener Webseiten kam fast immer auch folgende Warnung daher:
8360:8396:0512/142144.932823:WARNING:http_cache_transaction.cc(1192)] Unable to open or create cache entry
Als ich dann den Grafiktreiber vom Mesa DRI 915 auf Gallium 915 geändert habe sind diese Warnungen verschwunden. Leider fehlt mir hier das Hintergrundwissen um zu sagen, dass dieses Problem damit gelöst ist.
Im folgendem die Konsolenausgabe beim Start des Browsers. Direkt in der ersten Meldung fällt auf, dass das Sandboxing offenbar nicht funktioniert.
lang: "en" [4711:4711:0523/165343.765238:INFO:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/master/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox. qt.webenginecontext: GLImplementation: desktop Surface Type: OpenGL Surface Profile: NoProfile Surface Version: 3.0 Using Default SG Backend: yes Using Software Dynamic GL: no Using Angle: no Init Parameters: * application-name Web * browser-subprocess-path /usr/libexec/QtWebEngineProcess * disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture * disable-setuid-sandbox * disable-speech-api * enable-features NetworkServiceInProcess,TracingServiceInProcess * enable-threaded-compositing * gpu-preferences UAAAAAAAAAAoAAAQAAAAAAAAAAAAAAAAAABgAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAA= * in-process-gpu * use-gl desktop
Testweise habe ich das –no-sandbox Flag ausprobiert. Damit ist die "no usable sandbox" - Meldung dann zwar weg, aber das performance Problem besteht weiterhin. Sandboxing soll letztendlich aber aktiviert sein.
Kann das fehlende Sandboxing denn ggf. mit der schlechten Performance zusammenhängen?Im folgenden Screenshots von chrome://gpu (ohne Startargumente):
Leider habe ich keine passenden Lösungen in diesem Forum gefunden. Kann hier jemand weiterhelfen?