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 blocking main GUI thread when page has a GIF
Forum Updated to NodeBB v4.3 + New Features

QWebEngineView blocking main GUI thread when page has a GIF

Scheduled Pinned Locked Moved Unsolved QtWebEngine
5 Posts 3 Posters 2.3k 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.
  • X Offline
    X Offline
    xcoder
    wrote on last edited by
    #1

    Hello,

    I have encountered a small problem. For one of my applications I wanted to load instructions through QWebViewEngine.

    Overall it works fine, but when a page has even just one GIF, it keeps lagging/freezing every couple seconds. The whole widget not just the gif.

    It is also present in any of the examples provided by Qt.
    Here is a video demonstrating exactly the website I'm trying to load:
    https://drive.google.com/file/d/0B0HZf2UyMHqKTmZ4Y1h3emc2SkU/view?usp=sharing

    My guess is that, QWebEngineView uses main GUI thread for painting, hence it's lagging so badly.

    Any ideas on how it can be circumvented?
    Or maybe I should just give up with GIFs and use static images :( ?

    Kind Regards

    Only a biker knows why a dog sticks his head out of a car window.

    A 1 Reply Last reply
    0
    • X xcoder

      Hello,

      I have encountered a small problem. For one of my applications I wanted to load instructions through QWebViewEngine.

      Overall it works fine, but when a page has even just one GIF, it keeps lagging/freezing every couple seconds. The whole widget not just the gif.

      It is also present in any of the examples provided by Qt.
      Here is a video demonstrating exactly the website I'm trying to load:
      https://drive.google.com/file/d/0B0HZf2UyMHqKTmZ4Y1h3emc2SkU/view?usp=sharing

      My guess is that, QWebEngineView uses main GUI thread for painting, hence it's lagging so badly.

      Any ideas on how it can be circumvented?
      Or maybe I should just give up with GIFs and use static images :( ?

      Kind Regards

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @xcoder Ew that is pretty bad lag.

      If you are running on linux what does strace say is going on during those lag spikes? It might give you some insight as to what the problem is.

      I haven't used web engine enough to really comment on GIFs but I think that would probably be something that was caught before release.

      If you have code you want to share I can try compiling it and see if it happens on my systems or if it might be some configuration you are using or something.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xcoder
        wrote on last edited by xcoder
        #3

        Hola @ambershark ,

        Your intutition was spot on!!!!

        I just compiled on my linux machine and no lag whatsoever!
        Video Here
        So Ubuntu GCC 64bit Qt 5.8 and Qt 5.6 no lagging

        Windows 10. MSVC2015 64Bit Qt 5.8 lagging like hell (such a shame mingw is not supporting WebKits)

        In any case here is an easy to compile test, I converted some of the htmls so they can be included in QRC:
        Source Code

        Do you reckon it is a bug?

        Edit: I noticed that actually, even the good page without GIFs on windows machine lags a little bit. Barely noticable, but if you insist scrolling really quickly up and down with scroll bar. Once in a while it will go in a second long delay.

        Only a biker knows why a dog sticks his head out of a car window.

        A 1 Reply Last reply
        0
        • X xcoder

          Hola @ambershark ,

          Your intutition was spot on!!!!

          I just compiled on my linux machine and no lag whatsoever!
          Video Here
          So Ubuntu GCC 64bit Qt 5.8 and Qt 5.6 no lagging

          Windows 10. MSVC2015 64Bit Qt 5.8 lagging like hell (such a shame mingw is not supporting WebKits)

          In any case here is an easy to compile test, I converted some of the htmls so they can be included in QRC:
          Source Code

          Do you reckon it is a bug?

          Edit: I noticed that actually, even the good page without GIFs on windows machine lags a little bit. Barely noticable, but if you insist scrolling really quickly up and down with scroll bar. Once in a while it will go in a second long delay.

          A Offline
          A Offline
          ambershark
          wrote on last edited by
          #4

          @xcoder Hmm, it may be a bug. If you have a reproduceable example than I would submit it and let them check it out. It could just be a webengine issue specifically with MSVC 2015 or something.

          My development system with VS2015 on it is a virtual machine but I could test it and see what happens for me. I'm pretty busy right now but I'll do it later this week and let you know what I find.

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          0
          • nodeepshitN Offline
            nodeepshitN Offline
            nodeepshit
            wrote on last edited by
            #5

            did you guys resolve this problem now? I encountered this problem on Qt 5.15.2, when I use following setting:
            QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);

            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