Hi everybody

I use qcp v2.0 and have some performances issues in realtime.
The plot is set like this

m_plot->addGraph();
m_plot->graph(0)->setName(name);

QSharedPointer<QCPAxisTickerDateTime> timeTicker(new QCPAxisTickerDateTime);
timeTicker->setDateTimeFormat("HH:mm:ss");
timeTicker->setDateTimeSpec(Qt::UTC);
timeTicker->setTickCount(2);
m_plot->xAxis->setTicker(timeTicker);

m_plot->yAxis->setSubTicks(false);
m_plot->xAxis->setSubTicks(false);
m_plot->xAxis->grid()->setVisible(false);
m_plot->yAxis->grid()->setVisible(false);
m_plot->yAxis->ticker()->setTickCount(2);
m_plot->legend->setVisible(false);

Each time i receive a sample (around 100samples/sec), i do this :

m_plot->graph(0)->addData(m_currentTime, m_currentValue);
m_plot->graph(0)->data()->removeBefore(m_currentTime-m_histo);

And i refresh/replot every 100ms :

m_plot->yAxis->rescale();
m_plot->xAxis->rescale();
m_plot->replot();

The plot size is fixed (400x250). When my application is not maximized, the performances are pretty good, but as soon my app is maximized, it's very slow and i lost my 10Hz refresh frequency.

Here are some traces :

        QElapsedTimer timer;
        timer.start();
        m_plot->replot();
        qDebug() << "Replot Duration" << timer.elapsed() << "ms - Plot Size :" << ui->plot->size();

Not Maximized window :

Replot Duration 1 ms - Plot Size : QSize(400, 250)
Replot Duration 1 ms - Plot Size : QSize(400, 250)
Replot Duration 1 ms - Plot Size : QSize(400, 250)
Replot Duration 1 ms - Plot Size : QSize(400, 250)
Replot Duration 1 ms - Plot Size : QSize(400, 250)
Replot Duration 1 ms - Plot Size : QSize(400, 250)
Replot Duration 1 ms - Plot Size : QSize(400, 250)
Replot Duration 1 ms - Plot Size : QSize(400, 250)

Maximized window :

Replot Duration 80 ms - Plot Size : QSize(400, 250)
Replot Duration 80 ms - Plot Size : QSize(400, 250)
Replot Duration 138 ms - Plot Size : QSize(400, 250)
Replot Duration 139 ms - Plot Size : QSize(400, 250)
Replot Duration 138 ms - Plot Size : QSize(400, 250)
Replot Duration 76 ms - Plot Size : QSize(400, 250)
Replot Duration 74 ms - Plot Size : QSize(400, 250)

Any clue on this performances issue ?