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. QWebEngineView extremely slow
QtWS25 Last Chance

QWebEngineView extremely slow

Scheduled Pinned Locked Moved Unsolved QtWebEngine
7 Posts 6 Posters 2.2k Views
  • 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.
  • L Offline
    L Offline
    leon missoul
    wrote on last edited by
    #1

    Hi,

    I am building an application that does a lot of things. I wanted to have a built-in web browser, so I am creating it with QWebEngineView. The only problem is that it is so slow I can't even load a URL. The application itself is getting quite big with multiple threads, but this can't be the cause, right? If I create a separate super simple web browser it does work well.

    Any help is appreciated.

    jsulmJ 1 Reply Last reply
    0
    • L leon missoul

      Hi,

      I am building an application that does a lot of things. I wanted to have a built-in web browser, so I am creating it with QWebEngineView. The only problem is that it is so slow I can't even load a URL. The application itself is getting quite big with multiple threads, but this can't be the cause, right? If I create a separate super simple web browser it does work well.

      Any help is appreciated.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @leon-missoul said in QWebEngineView extremely slow:

      If I create a separate super simple web browser it does work well

      Well, then it is something in your application. Without knowing more about it is hard to say what the problem is. How high is CPU/MEM usage of your application without QWebEngineView? Did you try to profile your app to see where it spends most time?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      L 1 Reply Last reply
      0
      • jsulmJ jsulm

        @leon-missoul said in QWebEngineView extremely slow:

        If I create a separate super simple web browser it does work well

        Well, then it is something in your application. Without knowing more about it is hard to say what the problem is. How high is CPU/MEM usage of your application without QWebEngineView? Did you try to profile your app to see where it spends most time?

        L Offline
        L Offline
        leon missoul
        wrote on last edited by
        #3

        @jsulm Thanks for your response.

        I made yet another simple one and it's the same. It's so slow that you can't even scroll.
        Memory usage is about 400MB (my pc has 16GB) and CPU almost nothing. The new application is quite simple, so I can't figure out why this is happening.

        I did notice that in the 2 slow versions the browser was inside a qstackedwidget. In the faster one, it wasn't. Weird.

        B 1 Reply Last reply
        0
        • L leon missoul

          @jsulm Thanks for your response.

          I made yet another simple one and it's the same. It's so slow that you can't even scroll.
          Memory usage is about 400MB (my pc has 16GB) and CPU almost nothing. The new application is quite simple, so I can't figure out why this is happening.

          I did notice that in the 2 slow versions the browser was inside a qstackedwidget. In the faster one, it wasn't. Weird.

          B Offline
          B Offline
          BlackBird_BB
          wrote on last edited by
          #4

          @leon-missoul said in QWebEngineView extremely slow:

          @jsulm Thanks for your response.

          I made yet another simple one and it's the same. It's so slow that you can't even scroll.
          Memory usage is about 400MB (my pc has 16GB) and CPU almost nothing. The new application is quite simple, so I can't figure out why this is happening.

          I did notice that in the 2 slow versions the browser was inside a qstackedwidget. In the faster one, it wasn't. Weird.

          I think I met the same question as yours. I construct my ui via PyDracula. And the QWebEngineView is very very very slow. So I just construct a ui with only a QWebEngineView, It's very fluent. It's so weird.

          K 1 Reply Last reply
          0
          • B BlackBird_BB

            @leon-missoul said in QWebEngineView extremely slow:

            @jsulm Thanks for your response.

            I made yet another simple one and it's the same. It's so slow that you can't even scroll.
            Memory usage is about 400MB (my pc has 16GB) and CPU almost nothing. The new application is quite simple, so I can't figure out why this is happening.

            I did notice that in the 2 slow versions the browser was inside a qstackedwidget. In the faster one, it wasn't. Weird.

            I think I met the same question as yours. I construct my ui via PyDracula. And the QWebEngineView is very very very slow. So I just construct a ui with only a QWebEngineView, It's very fluent. It's so weird.

            K Offline
            K Offline
            kanslor
            wrote on last edited by
            #5

            @BlackBird_BB I met the same problem QWebEngineView run slow in PyDracula. I found that the shadow effects use in the QWebEngineView. Just Change the QWebEngine grphic effect(not use the parent's shadow), and disable it. It performs work both PyOneDark and PyDracula

            # DROP SHADOW in PyDracula 
            self.shadow = QGraphicsDropShadowEffect(self)
            self.shadow.setBlurRadius(17)
            self.shadow.setXOffset(0)
            self.shadow.setYOffset(0)
            self.shadow.setColor(QColor(0, 0, 0, 150))
            self.ui.bgApp.setGraphicsEffect(self.shadow)
            
            self.ui.webEngineView.setGraphicsEffect(self.shadow)
            self.ui.webEngineView.graphicsEffect().setEnabled(False)
            

            hope it works for you.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              desun_evan
              wrote on last edited by
              #6

              Have you tried running it in Release mode? I have had some slow results in debug mode...Maybe try testing it in Release mode? Or deploy for your system and see if it's faster?

              S0ulM1keS 1 Reply Last reply
              2
              • D desun_evan

                Have you tried running it in Release mode? I have had some slow results in debug mode...Maybe try testing it in Release mode? Or deploy for your system and see if it's faster?

                S0ulM1keS Offline
                S0ulM1keS Offline
                S0ulM1ke
                wrote on last edited by
                #7

                @desun_evan when I've experimented with WebEngineView release build works as intended to

                1 Reply Last reply
                0

                • Login

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