In QCPBarsGroup, keep a cache of non-stacked bars in mBaseBars

I've found that for QCPBarsGroups where there are a large number of QCPBars, performance can be quite poor. The main source of the performance loss is in QCPBarsGroups::keyPixelOffset, specifically the calculation of the baseBars QList. Since this QList is invariant over the (many) calls to ::keyPixelOffset, I've moved it out to a member variable, where it's effectively a cache.

With this, performance is much improved.

(I'm tim@kajeka.com, by the way; we have a commercial license for QCustomPlot)

Merge request reports

Loading