speeding up colorGridSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
dave novo
Newbie
Newbie
Posts: 25
Joined: Tue Oct 23, 2007 12:00 am

speeding up colorGridSeries

Post by dave novo » Sat Aug 09, 2008 1:24 am

Hello,

We were adding 1024 x 1024 pixel images to to a TColorGridSeries. The images were computed and then added to the TColorGridSeries by doing AddXYZ. It was soo slow, even with optimizations suggested by Narcis.

Profiling indicated that adding the colors to the FColors array was taking a huge amount of time. However, FColors is declared as private in TChartSeries.

We modified the source to expose the FColors and then populated the XValues.Values, YValues.Values and then allocated all the memory for the FColors at one time and filled it up. This cut about 40% of the time.

Everything seems to work fine. Are there any problems with this approach we should be aware of? If not, can I make a suggestion that

1) you make FColors a typesafe List of TColor
2) you expose it for optimal speed in adding colors to a TColorGrid

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Aug 11, 2008 12:03 pm

Hi dave,

thank you for your feedback. I don't think this could be problematic. We'll check the part of sources related on this and will try to include these features for the next major releases.

Post Reply