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. Performance messurements - Qt Widgets vs Qt Quick
Forum Updated to NodeBB v4.3 + New Features

Performance messurements - Qt Widgets vs Qt Quick

Scheduled Pinned Locked Moved QML and Qt Quick
12 Posts 6 Posters 15.5k 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.
  • Q Offline
    Q Offline
    qtd1d1
    wrote on last edited by
    #1

    Hi,

    is there a performance comparison between Qt Widgets and Qt Quick available?
    Or just performance messurements for one of these?

    Thanks

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      I know no compares.
      But I would say: it depends. If you have many property bindings, I would say, QtQuick gets slower, but that's my personal opinion.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        miroslav
        wrote on last edited by
        #3

        It is almost impossible to compare these two directly, since they cover very separate areas of functionality. Surely well done QML serves better for animated touch like UIs, while Qt's widgets still serve the purposes of the desktop better.

        For painting, a custom implemented self-painting widget performs less work than a QML scene and should thus be faster. It is also a lot more work to implement, and there is the potential of getting things wrong that are already solved in QML.

        So the answer is no, there is no direct comparison, since it would likely not make sense.

        Mirko Boehm | mirko@kde.org | KDE e.V.
        FSFE Fellow
        Qt Certified Specialist

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          qtd1d1
          wrote on last edited by
          #4

          bq. It is almost impossible to compare these two directly, since they cover very separate areas of functionality.

          Why? If you take for example an image and let it rotate and move around the screen.
          This is possible with Qt Quick and Qt Widgets and could be a first impression about the performance differences regarding image manipulation.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SteveKing
            wrote on last edited by
            #5

            @qtd1d1: For that comparison you would end up using a GraphicsView in the Widget case, and QML (which is based on a GraphicsView) in the QML case so I would image the comparison would show either the same performance, or slightly improved in the Widget case due to less abstraction.

            QML provides a good abstraction over the GraphicsView to allow rapid prototyping / development of touch based UIs, but as with any abstraction it will always be faster to write it using the base framework. This comes with the caveat that @miroslav stated, which is that it'll be more difficult and probably have new bugs.

            And now in an effort to answer the original question...

            We started doing our touch UI based on styled QWidgets, but this was way to slow, so I made the decision to switch to QML rather than coding custom painters. The new QML is much faster and easier to develop, but it does use more memory (javascript core etc.) than the widget based solution.

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Well, the above is true for QML 1.x, but not for QML 2, which is no longer based on QGraphicsView but uses scenegraph based rendering. My feeling is that that one will be faster than the graphicsview version.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                miroslav
                wrote on last edited by
                #7

                [quote author="qtd1d1" date="1327912915"]bq. It is almost impossible to compare these two directly, since they cover very separate areas of functionality.

                Why? If you take for example an image and let it rotate and move around the screen.
                This is possible with Qt Quick and Qt Widgets and could be a first impression about the performance differences regarding image manipulation.[/quote]

                That really depends. In Qt and C++, you can rotate the image and show it after that. In QML, you are always interacting with the scene. This is just an example, but I really think it is quite hard to find practically relevant performance comparisons between the two that are not flawed.

                Mirko Boehm | mirko@kde.org | KDE e.V.
                FSFE Fellow
                Qt Certified Specialist

                1 Reply Last reply
                0
                • Q Offline
                  Q Offline
                  qtd1d1
                  wrote on last edited by
                  #8

                  Maybe another reason why QML would be slower, is that QML needs to be interpreted at runtime.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    andre
                    wrote on last edited by
                    #9

                    [quote author="qtd1d1" date="1327996216"]Maybe another reason why QML would be slower, is that QML needs to be interpreted at runtime.[/quote]
                    So now, instead of measuring the relative performance of your scenario between QWidget and QML, you simply assume QML is going to be slower? It might be, but then again, it might not be. You don't know untill you measure, and only then you know the result for that case only.

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

                      [quote author="qtd1d1" date="1327677906"]Or just performance messurements for one of these?
                      Thanks[/quote]

                      Here, at the bottom of the post: "link":http://labs.qt.nokia.com/2011/05/31/qml-scene-graph-in-master/.

                      As stated above, comparing performance of widgets and QML is hard. I've heard that people tried running "chips" Graphics View example with QML, and it was indeed slower (on the other hand, that was a long time ago, so it might be different now). But, I have to confess here - once I've tried QML, I simply stopped worrying. It's easy, flexible, fast to develop, and runs well both under Graphics View and SceneGraph. I'm developing a pretty complex app right now, and there is no performance problems, even on mobile phones (Android in my case), while the workflow is simply full of awesomeness and win :)

                      (Z(:^

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

                        I agree with @sierdzio. We're developing on poverty spec WinCE5 devices, and although there are some performance constraints (mostly memory usage) the flexibility and development flow more than make up for this. Also I expect we would have had the same memory problems even with a QWidget based approach.

                        I guess the bottom line is try it and see!

                        1 Reply Last reply
                        0
                        • G Offline
                          G Offline
                          giesbert
                          wrote on last edited by
                          #12

                          [quote author="qtd1d1" date="1327996216"]Maybe another reason why QML would be slower, is that QML needs to be interpreted at runtime.[/quote]

                          AFAIK the interpretation is done once during load, not again and again.

                          What CAN make it slow is if you use many cascaded property bindings (which could makes it using much memory and CPU). This was shown on DevDays 2011. But I can also reach this with C++.

                          I would say it's a matter of case, which is faster. You have to check your requirements then choose the right technology for it.

                          If you need custom drawn graphs, QML would not fit.
                          If you need nice animations QML is better.
                          If you need a label and an edit field, it doesn't matter which you take I would say.

                          Nokia Certified Qt Specialist.
                          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                          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