Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. The performance of qwebengineview is really bad
Forum Updated to NodeBB v4.3 + New Features

The performance of qwebengineview is really bad

Scheduled Pinned Locked Moved Unsolved QtWebEngine
9 Posts 3 Posters 3.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    alvazz
    wrote on last edited by alvazz
    #1

    It's the first time to post in the Qt official community, um! Bad Qt!

    5dfeaf5f-eff0-463b-8075-cd1809f323de-image.png

    This is a local html file I opened directly in the chrome browser, and the loading event 1ms does not exceed 3ms at most.

    Opening the same html in qt with qwebengineview setUrl takes 118ms, and the fastest takes 72ms.

    90decb9a-3979-40ce-83fd-14535b5cfe75-image.png

    The code is so simple that I don't even want to write it down

    Qt version: 6.5.1

    QWebEngineView *webView = new .... (this);
    webView->setUrl(QUrl(.......
    webView->show();
    

    The performance is horribly poor.

    Oh, by the way, if I don't say it, someone will definitely say that you must be in Debug mode.
    What do you think? Why don't you try?

    Qt's optimization and support for QWebEngineView made me even doubt Qt's technical strength.

    And try to use it with QStackedWidget, you will find that Qt will give you a surprise
    hahaha
    interesting product.

    As far as the current situation is concerned, Qt company is still crazy about promoting their commercial version. Just last week, they contacted our team leader, please, don’t keep thinking about making money, just this kind of performance? Is it worth buying the commercial version?

    Chris KawaC 1 Reply Last reply
    1
    • A alvazz

      It's the first time to post in the Qt official community, um! Bad Qt!

      5dfeaf5f-eff0-463b-8075-cd1809f323de-image.png

      This is a local html file I opened directly in the chrome browser, and the loading event 1ms does not exceed 3ms at most.

      Opening the same html in qt with qwebengineview setUrl takes 118ms, and the fastest takes 72ms.

      90decb9a-3979-40ce-83fd-14535b5cfe75-image.png

      The code is so simple that I don't even want to write it down

      Qt version: 6.5.1

      QWebEngineView *webView = new .... (this);
      webView->setUrl(QUrl(.......
      webView->show();
      

      The performance is horribly poor.

      Oh, by the way, if I don't say it, someone will definitely say that you must be in Debug mode.
      What do you think? Why don't you try?

      Qt's optimization and support for QWebEngineView made me even doubt Qt's technical strength.

      And try to use it with QStackedWidget, you will find that Qt will give you a surprise
      hahaha
      interesting product.

      As far as the current situation is concerned, Qt company is still crazy about promoting their commercial version. Just last week, they contacted our team leader, please, don’t keep thinking about making money, just this kind of performance? Is it worth buying the commercial version?

      Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by Chris Kawa
      #2

      @alvazz It's always nice to back up your findings with more detail. Otherwise it sounds like random ranting.

      What platform are you on?
      Which Qt version are you using?
      What is the content of that test file?
      How are you measuring it?

      Can you provide a short complete example with the test data and methodology where you see the issue?

      someone will definitely say that you must be in Debug mode.
      What do you think? Why don't you try?

      So I did.
      Windows 11
      Stock Qt 6.5.1 from online installer
      Test html file from here
      Google Chrome 114.0.5735.110
      Measured using Chrome performance tools and QtWebEngine debugging.

      I've run 20 consecutive reloads for each. The average is about 4ms for both. I don't see the issue you're describing.

      And try to use it with QStackedWidget, you will find that Qt will give you a surprise

      Could you be more specific? Works fine for me.
      Are you sure you're measuring the right thing? The code you've shown has little to do with measuring web view performance. Maybe you're measuring web engine initial startup when first showing the widget? That would indeed take a bit time, but it's comparable to the startup time of a web browser.

      A 1 Reply Last reply
      3
      • Chris KawaC Chris Kawa

        @alvazz It's always nice to back up your findings with more detail. Otherwise it sounds like random ranting.

        What platform are you on?
        Which Qt version are you using?
        What is the content of that test file?
        How are you measuring it?

        Can you provide a short complete example with the test data and methodology where you see the issue?

        someone will definitely say that you must be in Debug mode.
        What do you think? Why don't you try?

        So I did.
        Windows 11
        Stock Qt 6.5.1 from online installer
        Test html file from here
        Google Chrome 114.0.5735.110
        Measured using Chrome performance tools and QtWebEngine debugging.

        I've run 20 consecutive reloads for each. The average is about 4ms for both. I don't see the issue you're describing.

        And try to use it with QStackedWidget, you will find that Qt will give you a surprise

        Could you be more specific? Works fine for me.
        Are you sure you're measuring the right thing? The code you've shown has little to do with measuring web view performance. Maybe you're measuring web engine initial startup when first showing the widget? That would indeed take a bit time, but it's comparable to the startup time of a web browser.

        A Offline
        A Offline
        alvazz
        wrote on last edited by alvazz
        #3

        @Chris-Kawa

        First of all, I didn't complain, I just found it incredible. Of course, the words I published may make people feel complained, but this is not the case. I just think that this kind of low-level problem appears in a so-called top-level framework like Qt. It's a pity, and these problems are very common problems. I even doubt that the Qt team has no test group? Or the Qt team's strategy is to just release the version, then throw it out, wait for feedback from community users, and then make a fix? Even, is it true that the Qt internal team does not even conduct the most basic tests?

        Some people may think that I am just talking about it.

        OK, then I will put a minimal demo to see this ridiculous effect.

        https://drive.google.com/file/d/17icOtkcrnfggdDOBePOwtUq2-aH2hxAU/view?usp=sharing

        You are very brave, I hope this post will not be deleted and we can keep the conversation going and I will give you more and more, ridiculous and mind-boggling bugs.

        Oh, I seem to have forgotten something.

        As you requested, I report to you on my development environment:

        OS: Windows 11
        CPU: i9-13900kf
        RAM: 128G
        IDE: VS2022
        Qt: 6.5.1 (Office Online Tool install)

        JonBJ Chris KawaC 2 Replies Last reply
        0
        • A alvazz

          @Chris-Kawa

          First of all, I didn't complain, I just found it incredible. Of course, the words I published may make people feel complained, but this is not the case. I just think that this kind of low-level problem appears in a so-called top-level framework like Qt. It's a pity, and these problems are very common problems. I even doubt that the Qt team has no test group? Or the Qt team's strategy is to just release the version, then throw it out, wait for feedback from community users, and then make a fix? Even, is it true that the Qt internal team does not even conduct the most basic tests?

          Some people may think that I am just talking about it.

          OK, then I will put a minimal demo to see this ridiculous effect.

          https://drive.google.com/file/d/17icOtkcrnfggdDOBePOwtUq2-aH2hxAU/view?usp=sharing

          You are very brave, I hope this post will not be deleted and we can keep the conversation going and I will give you more and more, ridiculous and mind-boggling bugs.

          Oh, I seem to have forgotten something.

          As you requested, I report to you on my development environment:

          OS: Windows 11
          CPU: i9-13900kf
          RAM: 128G
          IDE: VS2022
          Qt: 6.5.1 (Office Online Tool install)

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @alvazz said in The performance of qwebengineview is really bad:

          I even doubt that the Qt team has no test group?

          Even, is it true that the Qt internal team does not even conduct the most basic tests?

          It is these kinds of comments which are just silly. Of course Qt is thoroughly tested. Just because you are having some issue or have spotted some problem does not mean otherwise.

          @Chris-Kawa does not seem to report the same results as you, and has made some suggestions.

          A 1 Reply Last reply
          0
          • JonBJ JonB

            @alvazz said in The performance of qwebengineview is really bad:

            I even doubt that the Qt team has no test group?

            Even, is it true that the Qt internal team does not even conduct the most basic tests?

            It is these kinds of comments which are just silly. Of course Qt is thoroughly tested. Just because you are having some issue or have spotted some problem does not mean otherwise.

            @Chris-Kawa does not seem to report the same results as you, and has made some suggestions.

            A Offline
            A Offline
            alvazz
            wrote on last edited by alvazz
            #5

            @JonB It is normal for bugs to exist in any software, but is it necessary for bugs that are too simple to exist?
            Don't think about making money from users all day long, just make the product well first.

            If a top-level product cannot even accept criticism from users, and in turn accuses users of being stupid, I believe that this product must not be truly powerful

            JonBJ 1 Reply Last reply
            0
            • A alvazz

              @JonB It is normal for bugs to exist in any software, but is it necessary for bugs that are too simple to exist?
              Don't think about making money from users all day long, just make the product well first.

              If a top-level product cannot even accept criticism from users, and in turn accuses users of being stupid, I believe that this product must not be truly powerful

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @alvazz
              Nobody has accused you of being "stupid" --- where has anyone said that?

              I believe that this product must not be truly powerful

              That is entirely up to you.

              By the way, are you aware that is a forum of Qt users, just like yourself. This is not The Qt Company's forum. Since you say about " making money from users all day long" I guess you must have the paid commercial version, not the free open source one, so you can get support and complain about the speed directly to TQtC.

              If I were you I would wonder why my test times are different from @Chris-Kawa's, if you are really interested in a solution.

              Also, I certainly accept that ~100ms is much slower than 1ms and would want to investigate that in your case. But I am interested to know why even if you could not improve it (which hopefully you can) you are quite so bothered about loading a page taking 1/10th of a second? Do you find you can read the page much quicker than in a tenth of a second?

              Finally, QtWebEngine is a "wrapper" around Google's Chromium engine. It is possible whatever delay is in that engine rather than in QtWebEngine, so it wouldn't actually be a Qt issue. Have you considered this possibility? Maybe it is Google's chromium which is an untested, non-powerful product and you want to steer clear of?

              1 Reply Last reply
              0
              • A alvazz

                @Chris-Kawa

                First of all, I didn't complain, I just found it incredible. Of course, the words I published may make people feel complained, but this is not the case. I just think that this kind of low-level problem appears in a so-called top-level framework like Qt. It's a pity, and these problems are very common problems. I even doubt that the Qt team has no test group? Or the Qt team's strategy is to just release the version, then throw it out, wait for feedback from community users, and then make a fix? Even, is it true that the Qt internal team does not even conduct the most basic tests?

                Some people may think that I am just talking about it.

                OK, then I will put a minimal demo to see this ridiculous effect.

                https://drive.google.com/file/d/17icOtkcrnfggdDOBePOwtUq2-aH2hxAU/view?usp=sharing

                You are very brave, I hope this post will not be deleted and we can keep the conversation going and I will give you more and more, ridiculous and mind-boggling bugs.

                Oh, I seem to have forgotten something.

                As you requested, I report to you on my development environment:

                OS: Windows 11
                CPU: i9-13900kf
                RAM: 128G
                IDE: VS2022
                Qt: 6.5.1 (Office Online Tool install)

                Chris KawaC Offline
                Chris KawaC Offline
                Chris Kawa
                Lifetime Qt Champion
                wrote on last edited by Chris Kawa
                #7

                @alvazz Calm down. First of all we're not working for Qt Company, so I don't know what you're going about.

                Second, you're more than welcome to criticize. No need to be so defensive.

                Third - learn about Qt development process before you go on about it not being tested, because you're clearly clueless here.

                All I'm saying is just be thorough when you make such claims, because as of now they are unsubstantiated. Nothing you posted suggests that you're even measuring the same things. Looking at the code it seems you dynamically create a new web engine widget every time you want to show a page. Of course that's going to be slow. It' s like opening a web browser every time. If it's in the range of 118ms like you mentioned I'd said that's pretty good. That's not the same thing as just measuring page load time in a browser. It's like measuring opening a browser and then loading a page.

                Here are my results when using your code comparing the actual page loads, not creating widgets:

                Chrome:
                Chrome page load
                Your code using a remote profiling:
                Qt page load

                If you look at the numbers in the lower right corner they are pretty much within margin of error of each other and, as I mentioned before, fluctuate a bit on reloads, but stay around 4ms.

                A 1 Reply Last reply
                3
                • Chris KawaC Chris Kawa

                  @alvazz Calm down. First of all we're not working for Qt Company, so I don't know what you're going about.

                  Second, you're more than welcome to criticize. No need to be so defensive.

                  Third - learn about Qt development process before you go on about it not being tested, because you're clearly clueless here.

                  All I'm saying is just be thorough when you make such claims, because as of now they are unsubstantiated. Nothing you posted suggests that you're even measuring the same things. Looking at the code it seems you dynamically create a new web engine widget every time you want to show a page. Of course that's going to be slow. It' s like opening a web browser every time. If it's in the range of 118ms like you mentioned I'd said that's pretty good. That's not the same thing as just measuring page load time in a browser. It's like measuring opening a browser and then loading a page.

                  Here are my results when using your code comparing the actual page loads, not creating widgets:

                  Chrome:
                  Chrome page load
                  Your code using a remote profiling:
                  Qt page load

                  If you look at the numbers in the lower right corner they are pretty much within margin of error of each other and, as I mentioned before, fluctuate a bit on reloads, but stay around 4ms.

                  A Offline
                  A Offline
                  alvazz
                  wrote on last edited by
                  #8

                  @Chris-Kawa
                  OK, I will change a computer, and then the same test again, and then publish the results, but do you think because it is dynamically created webengineview, so the window should respond to the effect like close/reopen?

                  Chris KawaC 1 Reply Last reply
                  0
                  • A alvazz

                    @Chris-Kawa
                    OK, I will change a computer, and then the same test again, and then publish the results, but do you think because it is dynamically created webengineview, so the window should respond to the effect like close/reopen?

                    Chris KawaC Offline
                    Chris KawaC Offline
                    Chris Kawa
                    Lifetime Qt Champion
                    wrote on last edited by Chris Kawa
                    #9

                    @alvazz You still haven't said what and how you're measuring.
                    Creating a web engine view is a heavy task. It spins up entire chromium and javascript engines. It also changes rendering backend from software based widgets to hardware accelerated chromium surface.
                    If you're planning on switching to and from it a lot then you should create it once and just show/hide, not recreate every time you want to show new page, because yes, that's going to be slow like closing and re-opening a browser.

                    1 Reply Last reply
                    2

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved