Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML, QtQuick2 performance, How to get the best of OpenGL?
Forum Updated to NodeBB v4.3 + New Features

QML, QtQuick2 performance, How to get the best of OpenGL?

Scheduled Pinned Locked Moved QML and Qt Quick
13 Posts 4 Posters 8.6k Views 1 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.
  • S Offline
    S Offline
    Sil20
    wrote on last edited by
    #1

    Hi,
    I have a QML application displayed on 6 HD screens with touch screen capability. My graphic cards are Nvidia Quadro NVS 450.
    I had some slight latency issues
    I migrate from Qt4 Quick 1 to Qt5 Qtquick 2.0, and I got some Hudge Latency Issues!!!

    I read that Quick2 is based on OpenGL 2.

    How can I be sure to get the best of the OpenGL?
    Are there some custom drivers for graphic cards which would improve my performances problem, hence solve them?

    1 Reply Last reply
    0
    • U Offline
      U Offline
      utcenter
      wrote on last edited by
      #2

      You can build Qt for desktop OpenGL instead of the default at the moment ANGLE implementation.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chrisadams
        wrote on last edited by
        #3

        Hi,

        Yes, if you're on Windows, then don't use ANGLE. It causes huge performance issues especially related to text rendering with distance field rendering enabled. That will require you to build your own Qt on Windows, specifically configured with desktop OpenGL as utcenter mentioned.

        If you're on Mac or Linux, then please give more details: which version of Qt 5 are you using, exactly, and what sort of QML have you written? eg, do you have custom paint events, what sort of animations are you running, what does the QML profiler say regarding CPU usage - are you spending most of your time rendering, or running bindings/expressions, or what?

        Cheers,
        Chris.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          Sil20
          wrote on last edited by
          #4

          Hi,
          Thanck for the inputs. I still have 3 questions:

          • How to build Qt for desktop OpenGL? Is there some documentation or article?

          • ANGLE Implementation cause hudge performance drop. OK, but does this concerned all kinds of rotation? (Static vertical text, statis rectangle rotation, animated rotation...)?

          • chris you mentionned "text rendering with distance field rendering enabled". Whet is field rendering?

          Thancks again

          1 Reply Last reply
          0
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5
            • To build with OpenGL run configure with:
              @
              configure.exe -opengl desktop
              @

            • Dunno, it's the first time I hear about ANGLE introducing much overhead

            • You can choose text rendering method in Qt. I don't remember how it's done at the moment

            (Z(:^

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Sil20
              wrote on last edited by
              #6

              I executed qtbase\configure.exe -opengl desktop

              Then nmkae but it fails:
              @make[2]: Entering directory D:/Qt/qt-everywhere-opensource-src-5.0.1/src/tools/bootstrap' make -f Makefile.Release make[3]: Entering directory D:/Qt/qt-everywhere-opensource-src-5.0.1/src/tools/bootstrap'
              Makefile.Release:219: *** missing separator. Stop.
              make[3]: Leaving directory D:/Qt/qt-everywhere-opensource-src-5.0.1/src/tools/bootstrap' make[2]: *** [release] Error 2 make[2]: Leaving directory D:/Qt/qt-everywhere-opensource-src-5.0.1/src/tools/bootstrap'
              make[1]: *** [sub-tools-bootstrap-make_first] Error 2
              make[1]: Leaving directory `D:/Qt/qt-everywhere-opensource-src-5.0.1/src/tools'
              make: *** [sub-tools-make_first] Error 2
              NMAKE : fatal error U1077: 'cd' : return code '0x2'
              Stop.@

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                Make sure you follow "the guide":http://qt-project.org/wiki/Building_Qt_5_from_Git. I don't use windows much, but I think the output you've got means you don't have Perl in PATH.

                (Z(:^

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  chrisadams
                  wrote on last edited by
                  #8

                  Hi,

                  For more information about distance field text rendering, see the following blog posts:
                  http://blog.qt.digia.com/2011/07/15/text-rendering-in-the-qml-scene-graph/
                  http://blog.qt.digia.com/blog/2012/08/08/native-looking-text-in-qml-2/

                  Precisely which situations ANGLE causes issues in, I don't know - there have been many mentions of it completely tanking performance when using distance field based text rendering, but it shouldn't cause any issues with animations / rotations etc. The only way to know for sure is to benchmark your application with both, and find out. But certainly, if you change the renderType property of every Text element to use Text.NativeRendering, you should see a performance increase.

                  As I said earlier, what you really need to do is use the QML profiler to determine exactly what is taking the most time. Is it rendering, is it binding evaluation, is it signal handler evaluation, etc. Get some traces using the Analyzer tool in QtCreator, and then you can really start to figure out what's going on.

                  Cheers,
                  Chris.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Sil20
                    wrote on last edited by
                    #9

                    [quote author="sierdzio" date="1363027601"]Make sure you follow "the guide":http://qt-project.org/wiki/Building_Qt_5_from_Git. I don't use windows much, but I think the output you've got means you don't have Perl in PATH.[/quote]

                    Actually I have Perl in the path, as well as Python. but in the console I see something which make me think that the makefile loose the running directory or something similar@make[2]: Entering directory D:/Qt/qt-everywhere-opensource-src-5.0.1/src/tools/bootstrap' make -f Makefile.Release make[3]: Entering directory D:/Qt/qt-everywhere-opensource-src-5.0.1/src/tools/bootstrap'
                    Makefile.Release:219: *** missing separator. Stop.@

                    [quote author="chrisadams" date="1363027601"]As I said earlier, what you really need to do is use the QML profiler to determine exactly what is taking the most time. Is it rendering, is it binding evaluation, is it signal handler evaluation, etc. Get some traces using the Analyzer tool in QtCreator, and then you can really start to figure out what’s going on.
                    Cheers,[/quote]
                    I run the profiler ans saw the rendering was taking 95% of the time

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      Sil20
                      wrote on last edited by
                      #10

                      The compilation is running now, the issus was related to a Windows Environement Variable %MAKE% which was already defined. I just @set MAKE=@
                      And then it is running

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Sil20
                        wrote on last edited by
                        #11

                        Hi
                        I made a simple 2 files example which illustrate the Difference between Qtquick 1. and Quick 2.0.
                        When Displayed 4x HD screen mosaïc Quick2 is slower than Quick1 (even if QmlScene is used on quick2 and qmlviewer on quick1)

                        How can I post the zip file?

                        1 Reply Last reply
                        0
                        • sierdzioS Offline
                          sierdzioS Offline
                          sierdzio
                          Moderators
                          wrote on last edited by
                          #12

                          Dropbox is a good start, or some other hosting site.

                          (Z(:^

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            Sil20
                            wrote on last edited by
                            #13

                            Here are video taken from the following example:
                            "QmlTestLag.zip":http://www.filehosting.org/file/details/425271/TEstLagQtQuick2.zip
                            My graphic cards are Nvidia Quadro NVS 450, Mosaic Is activated, though Widows See only one big screen in its setup:

                            "Video Qt4Quick1":http://www.youtube.com/watch?v=p9le7cVfQug
                            Qt4, Quick1, 1 HD Screen qmlviewer: ~12%CPU Animation is smooth
                            Qt4, Quick1, 4 HD Screen qmlviewer : ~12%CPU Animation is smooth

                            "Video Qt5Quick2":http://www.youtube.com/watch?v=VNEfkWkjDPE
                            Qt5, Quick2, 1 HD Screen qmlscene : ~4%CPU Animation is very smooth
                            Qt5, Quick2, 4 HD Screen qmlscene : ~12%CPU Animation is really lagging

                            I have the same behavior when I use our custom main to display the QPML Application, so I think it is a good example. What I would Conclude:

                            • Quick2 is more CPU consumption friendly
                            • CPU is no the limit
                            • Qt Render even the part which does not need to be updated
                            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