Memory consumption of 'Color' structs

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Lofty
Newbie
Newbie
Posts: 3
Joined: Mon Mar 28, 2011 12:00 am

Memory consumption of 'Color' structs

Post by Lofty » Mon Mar 19, 2012 3:04 pm

I am plotting large amounts of data (millions of points) in charts, to the point that memory limits are a serious issue. When running a memory profiler, I found that a large slice of my memory consumption (~17%) comes from massive arrays of System.Color objects, which are storing the Color of each individual point in a series, even though the entire series is all the same Color. I was wondering if there was any way around this? ColorEach is already set to false.

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

Re: Memory consumption of 'Color' structs

Post by Sandra » Tue Mar 20, 2012 3:39 pm

Hello Lofty,

I recommend you remove the data you doesn't visualize, as explain in the real-time article. On the other hand, you can take a look in this link where there are more recommendations as you need do to prevent your memory usage.

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

Lofty
Newbie
Newbie
Posts: 3
Joined: Mon Mar 28, 2011 12:00 am

Re: Memory consumption of 'Color' structs

Post by Lofty » Tue Mar 20, 2012 4:39 pm

I'm sorry, but I don't really see how either of those are relevant. The real-time article gives tips for increasing speed, not reducing memory usage. Your second link is completely unrelated to the memory issue I am having. My issue is that a massive portion of my program's memory consumption is tied up in Color arrays inside TeeChart Series objects. Arrays which are full of the exact same value copied across for every point in the series. It's a massive waste of memory, and I want to know if there's a way to turn it off.

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

Re: Memory consumption of 'Color' structs

Post by Narcís » Wed Mar 21, 2012 8:17 am

Hi Lofty,

The point in the Real-time Charting article is that you could remove the points that are not being displayed from the chart for freeing memory. Is that feasible with your scenario?

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

Lofty
Newbie
Newbie
Posts: 3
Joined: Mon Mar 28, 2011 12:00 am

Re: Memory consumption of 'Color' structs

Post by Lofty » Wed Mar 21, 2012 9:56 am

No, the user needs to be able to view the entire timeline, and then zoom in on particular points for a more detailed view. Using the built in tools (FastLine) can increase speed by plotting less points, but all the points are still loaded into memory and as such this does not help me. Besides which, FastLines with DrawAllPoints = false are not acceptable as they do not produce graphically identical output.

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

Re: Memory consumption of 'Color' structs

Post by Sandra » Wed Mar 21, 2012 12:29 pm

Lofty,

Ok. I have added your request in wish-list with number [TF02016097] to be consider its inclusion in future versions of TeeChartFor.Net. On the other hand, you need know that if you want Steema offers the possibility to buy the source code. I think It would be very helpful for you, so, you can implement your requirements or enhancements as you want. If you are interested with source code of TeeChart, I suggest send an email to Sales Dept. at sales at steema dot com to get more information about it.

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

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

Re: Memory consumption of 'Color' structs

Post by Narcís » Wed Mar 21, 2012 12:37 pm

Hi Lofty,

I must say that you should be careful manipulating Colors ValueList as it's also used for marking null points in a series. They are set to Color.Transparent. If you are not using null points features you may remove that but you'll have references all around series' implementation.
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