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. [solved] Qt Quick 2 performance issues
Forum Updated to NodeBB v4.3 + New Features

[solved] Qt Quick 2 performance issues

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 2 Posters 2.1k 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
    Schneidi
    wrote on last edited by
    #1

    Hello, I started a new project in which I need to render Qml content on an WQHD display (2560 x 1440).
    And I'm still trying to get a pretty basic qml test to run fluently. But on the full resolution the rendering performance drops way below 10 fps.
    The target system runs a AMD G-T56N dual core processor 1,6 GHz 3,5 GiB ram and a dedicated AMD Radeon HD 6310 graphics card.

    My qml Test is nothing more than this:
    @import QtQuick 2.0

    Item {
    id: grid_view
    width: 800
    height: 600

    Rectangle {
        id: grid_view_bg
        anchors.fill: parent
    
        ListModel {
            id: employee_model
            ListElement { name: "User 1"; }
            ListElement { name: "User 2"; }
            ListElement { name: "User 3"; }
            ListElement { name: "User 4"; }
            ListElement { name: "User 5"; }
            ListElement { name: "User 6"; }
            ListElement { name: "User 7"; }
            ListElement { name: "User 8"; }
            ListElement { name: "User 9"; }
            ListElement { name: "User 10"; }
        }
        Component {
            id: employeeDelegate
            Item {
                id:employeeContainer
                width: 180;
                height: 200
                Rectangle {
                    id:employeeBody
                    anchors.fill: parent
                    anchors.rightMargin: 5
                    color: "red"
                    border.color: "black"
    
                    Rectangle {
                        id: employeeHeader
                        z:101
                        color: "#bbdbf3"
                        anchors.horizontalCenter: parent.horizontalCenter
                        width: parent.width
                        height: 40
                        Text {
                            anchors.centerIn: parent
                            text: '<b>Name:</b> ' + name
                        }
                        border.color: "black"
    
                    }
                }
            }
        }
        ListView {
            anchors.fill: parent
            model: employee_model
            orientation: Qt.Horizontal
            delegate: employeeDelegate
        }
    }
    

    }@

    The main.cpp:
    @QGuiApplication app(argc, argv);

    QtQuick2ApplicationViewer viewer;
    viewer.setMainQmlFile&#40;QStringLiteral("qml/untitled/main.qml"&#41;&#41;;
    viewer.show();
    

    @

    So I just used the predefined QtQuick 2 Application example to start with.
    Even on my development system running an intel quad core with dedicated ATI Radeon HD 3450 the performance start to decrease at a 1920 x 1080 resolution. The higher the resolution gets the worse is the performance. At the full WQHD resolution it is just unusable.

    What might be the problem here ?
    I would expect that qt is capable of a way better performance than what i get right now.
    Both cards support at least OpenGL 3 or higher.
    What can i do to get the qml animation on the list scrolling to run smooth.

    I could need some help with this one.
    Thank you for any help.

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

      Are you using Qt 5.2? What OS are you on? Have you compiled Qt yourself (or maybe we are talking about an ANGLE build)?

      I think in Qt 5.2 you can bump the version number to QtQuick 2.1, BTW.

      (Z(:^

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Schneidi
        wrote on last edited by
        #3

        Hi,

        I'm using Qt 5.1.1 compiled by myself on Ubuntu on both systems.
        May there be any performance difference between 5.1.1 and 5.2 ?

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

          Yes, the rendering engine has been significantly optimised (see "this":http://blog.qt.digia.com/blog/2013/09/02/new-scene-graph-renderer/ blog entry).

          If possible, compile Qt with "-opengl desktop" flag. It will make the most of your GPU.

          (Z(:^

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

            Ok thanks I'm going to compile Qt 5.2 with the opengl desktop flag and see what happens.

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

              Hey thanks for the hint sierdzio.
              It's amazing. On Qt5.2 the example runs so much better then with 5.1.1.
              Awesome piece the new scene graph.

              Thumbs up.

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

                hey, great! I'm happy that it helped you :)

                (Z(:^

                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