Performance problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

Performance problem

Post by Bert B. » Thu Mar 25, 2010 1:26 pm

Delphi 2007, TeeChart 7.12:

In my application I use TBarSeries containing more than 10.000 points. A TCursorTool is used as a progress indicator.
It seems that the whole TBarSeries is repainted when the TCursorTool is moved programmatically.
This results in very high CPU use, especially on PC's with single core CPU's.
Even when an assignment like CursorTool.XValue := X; doesn't result in a visible difference (the CursorTool remains at the same X, Y coordinates) the BarSeries is redrawn.

What can I do to reduce CPU load?
Does TeeChart have some options to reduce repainting of the TCursorTool?

Applying some tricks from the page http://www.teechart.net/reference/articles/index.php doesn't make any diffence.

If needed, I can supply a small demonstration program. Otherwise the effect can be seen with Tee7New.exe or Tee8New.exe (Tools -> Cursor -> Synchronizing Two).

Regards,
Bert

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Performance problem

Post by Yeray » Fri Mar 26, 2010 3:23 pm

Hi Bert,

Yes, it would be helpful if you could send us this demo program.
You could also take a look at this thread where something similar has recently been discussed.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

Re: Performance problem

Post by Bert B. » Fri Mar 26, 2010 3:37 pm

Hello Yeray,

The situation in the discussion you mention is different. The cursor is moved programmatically in my application.
Attached you will find a test application with 10.000 values, which is more like a minimum than a maximum in my software.

Regards,
Bert
Attachments
TeeChartTest.rar
(1.58 KiB) Downloaded 530 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Performance problem

Post by Yeray » Wed Mar 31, 2010 12:39 pm

Hi Bert,

Take a look at the attached example. It is a mix between your and GoToXY examples. As you'll see, using custom drawing it doesn't consume as much CPU as the Cursor tool so, is you don't need the features of the tool, I'd recommend you to use custom drawing.
Attachments
TeeChartTest.zip
(2.26 KiB) Downloaded 566 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Bert B.
Newbie
Newbie
Posts: 69
Joined: Fri Jun 15, 2007 12:00 am

Re: Performance problem

Post by Bert B. » Tue Apr 06, 2010 8:19 am

Hello Yeray,

Your modification greatly reduces CPU usage.

Thanks for your assistance,
Bert

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Performance problem

Post by Yeray » Tue Apr 06, 2010 9:44 am

Hi Bert,

You are welcome!
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply