Hey Uwe,
Thanks for so quick reply.
I know that there's more changes than this. Like instant paint being set to false by default but none of them (I had polygon clipping enabled already) seems to affect performance in the way using floats does.
To get more information I've followed your suggestion that the problem is platform dependent.
Everything I've said till now was based on 64bit Windows 7 os.
I've build the same app on 64bit Ubuntu (same box) and it works much faster. Plotting 2m points with Qwt 5.2.0 takes 250ms.
Qwt 6.0.1 is still slower but the difference is not that noticeable - the same 2m points took 400ms to plot.
I wish I could make it work like that on windows!
I will test it further like you mentioned, but for now you can see what I mean by altering static inline void drawPolyline() function in qwt_painter.cpp to look just like this:
{
QVector<QPoint> p;
for(int i = 0; i < pointCount; ++i)
p.append(points[i].toPoint());
tt.start();
painter->drawPolyline( points, pointCount );
std::cout << "Float draw took " << tt.elapsed() << "ms to complete." << std::endl;
tt.restart();
painter->drawPolyline( p.data(), pointCount );
std::cout << "Int draw took " << tt.elapsed() << "ms to complete." << std::endl;
}
{
QTime tt;
QVector<QPoint> p;
for(int i = 0; i < pointCount; ++i)
p.append(points[i].toPoint());
tt.start();
painter->drawPolyline( points, pointCount );
std::cout << "Float draw took " << tt.elapsed() << "ms to complete." << std::endl;
tt.restart();
painter->drawPolyline( p.data(), pointCount );
std::cout << "Int draw took " << tt.elapsed() << "ms to complete." << std::endl;
}
To copy to clipboard, switch view to plain text mode
In my case rendering 2m points on w7 yelds this output:
Float draw took 3009ms to complete.
Int draw took 1199ms to complete.
Float draw took 3009ms to complete.
Int draw took 1199ms to complete.
To copy to clipboard, switch view to plain text mode
Do you have any suggestions how to speed up rendering on windows (except level of details you've already mentioned)?
5.2.0 speed was acceptable where 6.0.1 is not user friendly at all.
Cheers!
Bookmarks