Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101348

WebEngineView is extremely slow when coexisting with Scene3D

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.2, 6.2.0
    • Qt3D, WebEngine
    • None
    • i7-8700K
      GTX 1060
      Windows 10
    • Windows

    Description

      To reproduce

       

      import QtQuick 2.12
      
      import QtWebEngine 1.2
      import QtQuick.Scene3D 2.15
      import Qt3D.Core 2.15
      import Qt3D.Render 2.15
      import Qt3D.Input 2.15
      import Qt3D.Extras 2.15
      
      ApplicationWindow {
          id: app    width: 800
          height: 600
          visible: true
          
          Scene3D {
              Entity {
                  id: sceneRoot
                  components: [
                      RenderSettings {
                          activeFrameGraph: ForwardRenderer {
                              clearColor: "black"
                          }
                          renderPolicy: RenderSettings.OnDemand                },
                      // Event Source will be set by the Qt3DQuickWindow
                      InputSettings { }
                  ]
              }
          }
      
          WebEngineView {
              anchors.fill: parent
              url: "https://www.google.com"
          }
      }
      
      

       

      I have a complex QtQuick app with lots of signal rendering. It works quite great and fast untill I add WebEngineView in. I gradually remove components until I found the problem is Scene3D

      CPU usage is low, and whole QML components is functioning properly except WebEngineView is extremely slow.

       

      Setup(PySide2 code is similar)

       

      #include <QGuiApplication>
      #include <QQmlApplicationEngine>
      #include <QtWebEngine>
      
      int main(int argc, char *argv[])
      {
      #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
          QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      #endif
          QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
          QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
      
          QtWebEngine::initialize();
      
          QGuiApplication app(argc, argv);
      
          QQmlApplicationEngine engine;
          const QUrl url(QStringLiteral("qrc:/main.qml"));
          QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
                           &app, [url](QObject *obj, const QUrl &objUrl) {
              if (!obj && url == objUrl)
                  QCoreApplication::exit(-1);
          }, Qt::QueuedConnection);
          engine.load(url);
      
          return app.exec();
      }
      
      

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            tim37021 Tim Hsu
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes