TFastLine Performance with big series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Newbie
Newbie
Posts: 3
Joined: Fri Dec 05, 2003 5:00 am

TFastLine Performance with big series

Post by » Wed Jun 08, 2005 10:44 am

I'm using Borland C++ Builder 6 with Teechart Pro 6.01 VCL

Problem:
FastLineSeries with big data arrays (>= 2M data)

Each operation in this chart (draw, zoom, etc.) blocks the main program and the other threads (for measuring) from working for a certain time (sometimes 5 s or more).

How can I accelerate this. Is it possible to use the TeeChart in a separate thread ? Is there an example for this ?

Thanks,

Rainer Zieschang

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jun 08, 2005 11:40 am

Hi Rainer,

To optimize real-time charting performance you should follow this article advise. It's Delphi written, however you won't have any problem porting it to BCB.

If the mentioned article doesn't help you could you please send us an example we can run "as-is" to reproduce the problem here?

You can post your examples at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Newbie
Newbie
Posts: 3
Joined: Fri Dec 05, 2003 5:00 am

Post by » Wed Jun 08, 2005 2:46 pm

Hi Narcis,

I use already many features mentioned in the article.

The whole project is too big and depends on various hardware drivers for data acquisition.

For the problem part see the
attachment in news://www.steema.net/steema.public.attachments

I can not use the option
Series1->DrawAllPoints = false;

because the series plot in the lower chart (see picture) then shows not all the information. (The example contains 2*1048576 data points)

Executing the line
Series1->Repaint();
or zooming in this chart or simple resizing the window
blocks the main program and the other threads in the background (for measuring) from working for a certain time (sometimes 5 s or more).

I remember reading the VCL is not Thread-safe and therefore must be used from the main program.

Or can the chart be operated in a separate thread ?


Thanks,
Rainer

SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Post by SteveP » Wed Jun 08, 2005 5:19 pm

With 2,000,000 points, about 1000 points are being plotted at each pixel. Have you tried the DownSampling function ? Or perhaps manually determine the number of points plotted per pixel and go through each sub-section of such plotted data and determine the local min and max and only plot that.

I'm surprised 2M points takes 5 sec to plot, especially if you use TChartValues(X) dynamic arrays.

Can your data acquisition be done in a separate thread from the main TChart program ?

Steve
Last edited by SteveP on Thu Jun 09, 2005 1:26 pm, edited 2 times in total.

Newbie
Newbie
Posts: 3
Joined: Fri Dec 05, 2003 5:00 am

Post by » Thu Jun 09, 2005 8:50 am

Hi Steve,

for 2M points the time necessary to redraw the series depending on zoom status is from 2 s up to 4 s.

The data acquisition is already done in a separate thread and the problem is the drawing of the series blocks the main program and the thread from working so some data are lost.

Rainer

Post Reply