Series.Delete function takes too long with labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
slvjm
Newbie
Newbie
Posts: 3
Joined: Wed Sep 23, 2009 12:00 am

Series.Delete function takes too long with labels

Post by slvjm » Thu Jun 16, 2011 8:33 pm

I am using TChart version 8.06 to create a real time graph. When I add the data points via AddXY, I am adding a label for each point. If the users sets up their graph to hold hundred of thousands of data points, and to delete most, or all, of those points when the graph is full, the call to the series's delete function can take a very long time. For example, if I have 500,000 points in my graph, all of which have a label, the function call "series.Delete(0, 499,999)" can take well over 50 seconds. If I do not add a label in the AddXY function, then that same function all takes about 1 millisecond.

Is this a TChart bug, or is there some kind of optimization that I should be doing?

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Series.Delete function takes too long with labels

Post by Sandra » Tue Jun 21, 2011 10:38 am

Hello slvjm,

Sorry for the delay. I have added your request in wish-list with number [TV52015622] to be consider it inclusion in future versions of TeeChartVCL. On the other hand, I think can be helpful for you, use FastLine Series, so if you use it the problem about performance disappears and the Chart is painted faster, to check it you only have change Point Series to FastLineSeries.

Thanks,
Best Regards,
Sandra Pazos / 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

slvjm
Newbie
Newbie
Posts: 3
Joined: Wed Sep 23, 2009 12:00 am

Re: Series.Delete function takes too long with labels

Post by slvjm » Tue Jun 21, 2011 2:47 pm

For me, this happens with both the TLineSeries and the TFastLineSeries. However, the drawAllPoints property was set to true. Perhaps setting this to false makes a difference with the TFastLineSeries? I will have to experiment a bit more.

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

Re: Series.Delete function takes too long with labels

Post by Narcís » Wed Jun 22, 2011 1:09 pm

Hi slvjm,
Perhaps setting this to false makes a difference with the TFastLineSeries?
Yes, for sure! DrawAllPoints feature was implemented for performance purposes. There's also DrawAllPointsStyle property which may help you find the most suitable approach to your needs.
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

Post Reply