Page 1 of 1

Memory consumption of 'Color' structs

Posted: Mon Mar 19, 2012 3:04 pm
by 15658857
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.

Re: Memory consumption of 'Color' structs

Posted: Tue Mar 20, 2012 3:39 pm
by 10050769
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,

Re: Memory consumption of 'Color' structs

Posted: Tue Mar 20, 2012 4:39 pm
by 15658857
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.

Re: Memory consumption of 'Color' structs

Posted: Wed Mar 21, 2012 8:17 am
by narcis
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.

Re: Memory consumption of 'Color' structs

Posted: Wed Mar 21, 2012 9:56 am
by 15658857
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.

Re: Memory consumption of 'Color' structs

Posted: Wed Mar 21, 2012 12:29 pm
by 10050769
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,

Re: Memory consumption of 'Color' structs

Posted: Wed Mar 21, 2012 12:37 pm
by narcis
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.