Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT charts use 50% of CPU
QtWS25 Last Chance

QT charts use 50% of CPU

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtchartsqtchartchartsqt 5.8
6 Posts 5 Posters 3.0k 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.
  • S Offline
    S Offline
    Swapnil_Shelke
    wrote on 16 Jan 2018, 10:14 last edited by
    #1

    Hi,
    I am using Qt 5.8 on window 8.
    Running a basic qt chart example of Dynamicspline chart given by qt but when i am running this dynamicspline application in release mode still it takes 50% of my cpu usage.
    What can be the issue ,if any and what can i do to reduce the cpu usage .

    thank u.
    1_1516097592656_chart_running.jpg 0_1516097592655_before_chart.jpg

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Jan 2018, 10:15 last edited by
      #2

      Hi,

      The first idea that comes to mind is to update to a more recent version of Qt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • J Offline
        J Offline
        J.Hilk
        Moderators
        wrote on 16 Jan 2018, 10:21 last edited by
        #3

        You could use the QML-version of QT-Charts, that one uses the GPU to calculate and display QtChart-objects.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        S 1 Reply Last reply 16 Jan 2018, 12:50
        1
        • J J.Hilk
          16 Jan 2018, 10:21

          You could use the QML-version of QT-Charts, that one uses the GPU to calculate and display QtChart-objects.

          S Offline
          S Offline
          Swapnil_Shelke
          wrote on 16 Jan 2018, 12:50 last edited by
          #4

          @J.Hilk
          i tried qml qmlf1legends chart example in qt but same the cpu gradually increases with one line drawing .

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kuzulis
            Qt Champions 2020
            wrote on 16 Jan 2018, 14:40 last edited by
            #5

            Use Qwt (or QCustomPlot) instead, as QtCharts it is not good choose, IMHO (you can find similar issues on this forum).

            1 Reply Last reply
            1
            • 6 Offline
              6 Offline
              6thC
              wrote on 17 Jan 2018, 04:18 last edited by
              #6

              I'd recommend using https://doc.qt.io/qt-5.10/qxyseries.html#replace-5

              Replacing points one by one destroys a cpu. The metrics for me was just not even worth measuring - it was just an immediate hell no - forget that - I need faster updates. I like declarative QML for gui as a preference but calling replace on a single point fires way too many signals and takes way too long.

              I throw my QML LineSeries to a QXYSeries and call replace in c++

              In the future I'll probably just declare my series in C++. I wish I could have a better supported hybrid of c++ and QML charts but I have this working very fast using useOpenGL : true; (you can also c++ setUseOpenGL(true) )

              1 Reply Last reply
              1

              3/6

              16 Jan 2018, 10:21

              • Login

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