Page 1 of 1

Why is Contour Series much slower when using filled mode

Posted: Thu Oct 10, 2019 8:42 am
by 16584857
I created a TeeChart with two TContourSeries: One with filled set to false and one set to true. Both get exactly the same data and both are not active while feeding the data to them.

When I activate the not filled series it takes less than a second to paint itself. Not so the filled series. It takes at least 10 times longer to draw itself.

Why is that so? I would imagine that the filled series uses the same algorithm as the not filled one and then some sort of flood fill is used. That should not take this long.

Is there a way to speed up painting of the series in filled mode? Data reduction is not an option here.

Re: Why is Contour Series much slower when using filled mode

Posted: Fri Oct 11, 2019 12:50 pm
by yeray
Hello,

I'm afraid the filling of the contour series isn't so simple as one could think at a first glance.
We are internally using a TIsoSurface to draw the cells, which makes the process slower.

Some references:
https://www.steema.com/support/viewtopi ... =3&t=12326
https://www.steema.com/support/viewtopi ... =3&t=10796
http://bugs.teechart.net/show_bug.cgi?id=1438

Re: Why is Contour Series much slower when using filled mode

Posted: Fri Oct 11, 2019 1:13 pm
by 16584857
Hello Yeray,

thanks for the info. So I will have to find a way to distract the user from waiting for the chart.

Is there some kind of progress event while the chart is calculated?

Re: Why is Contour Series much slower when using filled mode

Posted: Mon Oct 14, 2019 10:05 am
by yeray
Hello,

The method that needs more time is the TIsoSurface.DrawCell. We could add an event in it but it could have a negative impact on the performance.
Ie:
Project1_2019-10-14_12-02-28.png
Project1_2019-10-14_12-02-28.png (25.95 KiB) Viewed 10378 times
I'll send you a test unit and an example of usage.