Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-84068

Performance issue with QtCharts::QXYSeries

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.2
    • Charts
    • None
    • Linux/X11

    Description

      I have 155 objects each containing 11 QtCharts::QLineSeries. So this makes a total of 1705 QLineSeries objects. The current design accumulates points every second up to 86400 points to contain a range of 24h.

      At each second, I'm adding a point to all 1705 series object.

      When I launch my program and start collecting data, CPU usage is at around 20%. After about an hour, processor usage saturates at 100%.

      I think that I suffer from a realloc bomb. When my Series point capacity is reached, all 1705 series will reallocate at the same time.

      I have 2 suggestions for this class:

      1. You should allow a QXYSeries user to call reserve() on the underneath QVector. (perhaps by adding QXYSeries::reserve() method
      2. You should make it hard to misuse your class by deprecating points() method. I was exhaustively using it without being aware of the performance cost that I was paying using it...

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0348803 Miikka Heikkinen
            lano1106 Olivier Langlois
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes