Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.0
-
None
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.