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

Unefficient spline interpolation

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.9.0
    • Graphs: 2D
    • None
    • All

    Description

      The implementation of QSplineSeries could be done in a more efficient way:

      a) performance

      QSplineSeriesPrivate::calculateSplinePoints iterates too often ( IIRC 7 times ) what could be done in one loop.

      b) memory ( temporary )

      the loops ( above ) create temporary buffers that multiplies the memory usage during the calculation

      c) memory ( permanent )

      the result of the calculation are the 2 control points for each line describing the interpolating bezier curve.

      However for an interpolation of C1 continuity you only need to store the slope(s) ( 2 for parametric splines ). The corresponding Bezier curve can be found from the points/slopes when painting on the fly.

      IIRC correctly the Bezier curves ( = polynomials ) will be translated into a QPainterPath later, what doubles the temporary memory requirements. My guess is that this is done to process the lines in some sort of "doing it all" path.

      Attachments

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

        Activity

          People

            kagro Kaj Grönholm
            uwe Uwe Rathmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes