Page 1 of 1

Performance problem with Teechart för .NET

Posted: Mon Dec 18, 2006 8:25 am
by 9643016
We make a real-time charting, adds data to a chart in 4-16Hz with Line.Add(Time, Value). The number of series varies between 1 - 10. We also have one series that is printed by a timer in 8Hz. This timer gets disturbed (delayed) by adding data to the chart, even when it it just one series. We have set DrawAllPoints to False, AutoRepaint to False and XValues.Order to None but it doesnt help. We also run a sound library, DirectShow, that lags when we adds values to the chart. Is there a way to solve this problem?

Posted: Mon Dec 18, 2006 9:07 am
by narcis
Hi PBM Stressmedicine,

Have you read this article on how to optimize TeeChart's performance with real-time charting? Some of the hints explained here may be helpful for you.

Posted: Mon Dec 18, 2006 12:09 pm
by 9643016
Yes, I have read it. DrawAllPoints is set to False, AutoRepaint to False and XValues. Order to None. The series are all FastLines. I havent found the FastPen or the FastCalc properties, do they not exist in vb.net? We must have titles and legends. The changes I made didnt make any difference, the problems remains.

Posted: Wed Dec 20, 2006 12:57 pm
by narcis
Hi PBM Stressmedicine,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.

Posted: Thu Jan 04, 2007 2:37 pm
by 9643016
The program requires a hardware device. But we have tested and comed to this conclusion:

1. When high frequency data is received on the com ports in vb.net there is no performance problem. The data is not plotted in the TeeChart graph.

2. When data is plotted in up to 30Hz into the graph with Line.Add there is no performance problem. The data is calculated, not received from the com ports.

3. When data is recieved on the com ports in more than ca 4Hz AND the data is immediately plotted in the graph we experience heavy performance problems. One of the effects is that that the vb.net timers get delayed. Another effect is that playing sound starts lagging.

Our theory is that the comport callback function is executed in a separate thread and when trying to plot into the graph a lot of synchronization code is run and slowing the program down. Can this be correct and what can we do about it?

Posted: Fri Jan 05, 2007 4:22 pm
by narcis
Hi PBM Stressmedicine,

In your second case, do you have tChart1.AutoRepaint set to false? If so, if you put a count into the AfterDraw event, can you confirm that the chart is not painting every time the add method is called?

Thanks in advance.

Posted: Wed Jan 10, 2007 5:12 pm
by 9643016
We have set the AutoRepaint to False now and repaint the chart programmatically instead. It seemes liked it helped, thanks!