RealTime Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

RealTime Chart

Post by Candy » Thu Jan 27, 2011 2:48 am

Hello,

I create a realtime chart with the TeeChart for .net. And I find the memory will be increased slowly when the real-time chart building. The memory will be increased 3M—5M in 24 hours. How could I solve this problem?

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

Re: RealTime Chart

Post by Sandra » Thu Jan 27, 2011 10:54 am

Hello Candy,

I recommend take a look in our Technical articles concretely in Real-time Charting. If it isn't sufficient please, send us your project, so we can reproduce your problem exactly here, and try to find a solution.

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

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Sun Jan 30, 2011 7:40 am

Hello,
The attachemt is my code which I used to built the Real-Time chart. Could you provide me some methods about how to improve the efficiency? Otherwise, I can't find the DrawAllPoints property of the tchart which mentioned in the Technical articles .Thanks!

Best Regards,
Candy

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Sun Jan 30, 2011 8:56 am

Hello,
I forgot to add the attachment in the last post. This is my code file.
Attachments
Class1.rar
(3.24 KiB) Downloaded 635 times

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

Re: RealTime Chart

Post by Narcís » Mon Jan 31, 2011 11:18 am

Hi Candy,
Candy wrote:Could you provide me some methods about how to improve the efficiency?
The easiest solution to reduce memory consumption is removing "unnecessary" points as shown in the DoScrollPoints method in the Real-time charting article. Otherwise data stays in memory. If no data is removed then memory consumption will increase. As far as I can see you are already doing that in UpdateLeftChart() method.
Candy wrote: Otherwise, I can't find the DrawAllPoints property of the tchart which mentioned in the Technical articles .
This property only exists for FastLine series.
Candy wrote:I forgot to add the attachment in the last post. This is my code file.
Thanks, it was useful to see the nature of your application. Please bear in mind that using FastLine series would increase your application performance, not memory consumption as data is stored in the same way for Line and FastLine series. Also, FastLine series has no Pointer property, I see you are using it in your code. If you need that we run some tests with your code please attach a simple example project we can run "as-is" to reproduce the problems here.

Thanks in advance.
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

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Sat Feb 12, 2011 8:42 am

Hi Narcís ,
Thanks for your reply. The attachment is my test application. I following your method to modify my code,but the memory of my computer also increase when I run it.
Is there any other things should I do? And I notice that the cpu using is come up to 50%. What should I do?
Attachments
WindowsFormsApplication1.rar
(16.82 KiB) Downloaded 606 times

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Mon Feb 14, 2011 9:09 am

Hello,
The attachment is my other test application. The memory increase from 20M to 40M in 6min when the application running. How could I to optimize my code?
Attachments
TestTchartMemeory.rar
(71.45 KiB) Downloaded 620 times

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

Re: RealTime Chart

Post by Sandra » Mon Feb 14, 2011 11:26 am

Hello Candy,

Could you send again the last project, because the project you have attached doesn't work?

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

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Tue Feb 15, 2011 1:24 am

Hi Sandra,
The attachment is the whole project.
Attachments
TestTchartMemeory.rar
(73.44 KiB) Downloaded 615 times

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

Re: RealTime Chart

Post by Sandra » Wed Feb 16, 2011 9:17 am

Hello Candy,

I have tested your project for 15 hours and the memory oscillates from 35M to 40M, and doesn't increase exaggeratedly using last version of TeeChart.Net 2010.

Could you say us, which version of TeeChart are you using now?

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

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Thu Feb 17, 2011 1:21 am

Hi Sandra,
Thanks for your reply,I used the TeeChart.Net 2010 too.

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Thu Feb 17, 2011 6:55 am

Hello,
Beacause our applcation will run in a long time,so if the memory increased unending,it's not allowed. Is there any ways to prevent the memory increased?
Thanks!
Best Regards,
Candy

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

Re: RealTime Chart

Post by Narcís » Thu Feb 17, 2011 8:16 am

Hi Candy,
I used the TeeChart.Net 2010 too.
Which is the exact TeeChart for .NET 2010 build you are using? Is it build 4.0.2011.02080, which is the latest release available? If not, can you please try using this build?
Beacause our applcation will run in a long time,so if the memory increased unending,it's not allowed. Is there any ways to prevent the memory increased?
The first and most important way to prevent the memory used by the application growing is removing data which is no longer used or visible. Otherwise TeeChart needs memory to store this data and you should expect memory consumption to increase. Having said that, if you are already removing unneeded data from your application and memory consumption is still growing in a uncontrolled manner it could be a memory leak in TeeChart. According to what Sandra wrote here that's not the case with your application, memory stays in the same memory usage range during the whole execution of the application. Is that what you experience at your end?

Thanks in advance.
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

Candy
Newbie
Newbie
Posts: 57
Joined: Mon Apr 26, 2010 12:00 am
Contact:

Re: RealTime Chart

Post by Candy » Mon Feb 21, 2011 7:31 am

Hello,
I want the memory usage doesn't increased when my application is running. Is there any method to implement it?
Thanks !

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

Re: RealTime Chart

Post by Narcís » Mon Feb 21, 2011 12:59 pm

Hi Candy,

For us to be able to help you further on this issue could you please answer the question I made you in my previous reply?
I want the memory usage doesn't increased when my application is running. Is there any method to implement it?
If you get the same behavior as Sandra and I described here this is normal considering you are already removing points from your chart, which is the way to avoid memory usage increasing. Please notice that the .NET Framework doesn't free objects immediately, it's garbage collector who does that task. Therefore you may see memory consumption oscillations in your application. At this thread you'll find a more in deep discussion on garbage collector and TeeChart.

Thanks in advance.
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