OutOfMemoryException

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
BalfourBeatty_Carl
Posts: 1
Joined: Fri Jun 28, 2013 7:57 am

OutOfMemoryException

Post by BalfourBeatty_Carl » Fri Jun 28, 2013 8:27 am

Hi,
I'm having some issues with large data sets going into charts in my WinForms application. I'm running 32 bit and have been quite happily loading the data into structures of List<List<Point3D>> (wherer Point3D is what I'm using to represent a 3D data point). But when I come to load this data into a SurfacePoint[,] structure I'm getting OutOfMemoryException. I'm yet to find the absolute limit of the 2D array of surface points, but I know that it can't handle the size of data I need it to (which for a quick test case is SurfacePoint[150000,10].
I know that the limitation in the size of a single object is 2GB, but obviously the SurfacePoint structure is holding more than just the three 64 bit floats of the data points, and an array is classed as a single object from a memory usage perspective, whereas a List<List<SurfacePoint>> would not be classed as a single object.
One solution I have tried is to only dhow a sub set of the data at any one time on the chart and then refresh the points to effectively scroll across the chart, but the data refresh needed to scroll the chart along is then taking more time than we would like it to.

Has anyone come across this issue before? And if so is there a work around for it?

Thanks

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: OutOfMemoryException

Post by ArctionPasi » Mon Jul 08, 2013 6:43 am

Hi Carl,

The Data array of Surface series itself doesn’t reserve much memory, but the rendering data that is constructed from those data points, instead. I’m sure you will struggling with 32-bit process. The Rendering data is composed of triangles, vectors for 3D lights (normals) etc, and it can’t be practically made any more compact than they are now. For a 64-bit process this shouldn’t any kind of problem, especially when having 4Gigs or more RAM.

I believe some kind of subset loading needs to made in your side. Have noticed the InsertColumnBackAndScroll method of the surface series? It scrolls the new data very efficiently, when you are pushing one column every time. See Spectrogram example.

Would it solve your problem?

Another approach is to use a couple of surface series, where you can swap new segment of data as the axis scrolls to a new view.

I hope this helps :geek:
LightningChart Support Team, PT

Post Reply