Urngent:Memory issue while surface graph plot
Urngent:Memory issue while surface graph plot
We are using Teechart graph control for a .Net 4.0(Winform) desktop application development.
We are facing problems in plotting surface graph.
Issues:
1. Plotting surface graph for 65 files(.csv). Each file has 3000 000 points. Each point is of double data type.
We are passing file data as a data table.
In terms of data table, 65 data table, average row count =>1200, Column count => 3, in each table.
After plotting some table points, it throws out of memory exception.
We are using Teechart's "Surface" API --> Surface.Add
2. An application going into not responding state with large data.
3. Is there any API to plot point as fast as possible similar to FastLine. If yes, please provide the version details.
System Information (Desktop)
OS: Windows 7, 32 bit
Processor: Intel i5-3470 CPU, 3.20 GHZ
RAM: 4GB
IDE: Ms Visual Studio 2010
It will be helpful if you address these issues ASAP as we have product release soon.
We are facing problems in plotting surface graph.
Issues:
1. Plotting surface graph for 65 files(.csv). Each file has 3000 000 points. Each point is of double data type.
We are passing file data as a data table.
In terms of data table, 65 data table, average row count =>1200, Column count => 3, in each table.
After plotting some table points, it throws out of memory exception.
We are using Teechart's "Surface" API --> Surface.Add
2. An application going into not responding state with large data.
3. Is there any API to plot point as fast as possible similar to FastLine. If yes, please provide the version details.
System Information (Desktop)
OS: Windows 7, 32 bit
Processor: Intel i5-3470 CPU, 3.20 GHZ
RAM: 4GB
IDE: Ms Visual Studio 2010
It will be helpful if you address these issues ASAP as we have product release soon.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Urngent:Memory issue while surface graph plot
Hello Alias,
1. Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
2. Can you please provide a simple running example for that as well?
3. No specific 3D "fast" series. However, you can apply some of the suggestions in the Real-time Charting article here so that your chart refreshes as fast as possible.
Also, which exact version of TeeChart are you using?
Thanks in advance.
1. Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
2. Can you please provide a simple running example for that as well?
3. No specific 3D "fast" series. However, you can apply some of the suggestions in the Real-time Charting article here so that your chart refreshes as fast as possible.
Also, which exact version of TeeChart are you using?
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 |
Instructions - How to post in this forum |
Re: Urngent:Memory issue while surface graph plot
Hi Narcís,Narcís wrote:Hello Alias,
1. Can you please attach a simple example project we can run "as-is" to reproduce the problem here?
2. Can you please provide a simple running example for that as well?
3. No specific 3D "fast" series. However, you can apply some of the suggestions in the Real-time Charting article here so that your chart refreshes as fast as possible.
Also, which exact version of TeeChart are you using?
Thanks in advance.
I will share sample example soon.
For now, I have attached error screen shot with all error details. Please have a look.
- Attachments
-
- T Chart Error Info
- TChartMemoryException.jpeg (103.43 KiB) Viewed 24727 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Urngent:Memory issue while surface graph plot
Hi Alias,
Thanks for the feedback. With this error message is almost impossible finding which the problem might be. According to the image I guess you are using setting the IrregularGrid property of your 3D series to true. My suggestion would be to try disabling it unless it's strictly necessary. Charts with IrregularGrid set to true are slower to calculate and therefore slower to plot.
Thanks for the feedback. With this error message is almost impossible finding which the problem might be. According to the image I guess you are using setting the IrregularGrid property of your 3D series to true. My suggestion would be to try disabling it unless it's strictly necessary. Charts with IrregularGrid set to true are slower to calculate and therefore slower to plot.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Urngent:Memory issue while surface graph plot
Hi Narcis,Narcís wrote:Hi Alias,
Thanks for the feedback. With this error message is almost impossible finding which the problem might be. According to the image I guess you are using setting the IrregularGrid property of your 3D series to true. My suggestion would be to try disabling it unless it's strictly necessary. Charts with IrregularGrid set to true are slower to calculate and therefore slower to plot.
Thanks for info. In my case IrregularGrid = true;
Initially with this property memory exception occured while processing/plotting 19 file but if I set to false it works for more than 40 files. But If I load more than 100 files same exception.
Sample code what i m doing
Code: Select all
void AddSuface(DataTable dataSourceTable, string xColName, string yColName, string zColName)
{
Surface surface = new Surface();
surface.IrregularGrid = true;
//Add data to the surface object
for (int Index = 0; Index < dataSourceTable.Rows.Count; Index++)
{
DataRow xrow = dataSourceTable.Rows[Index];
double xVal = Convert.ToDouble(xrow[xColName]);
for (int Index1 = 0; Index1 < dataSourceTable.Rows.Count; Index1++)
{
DataRow row = dataSourceTable.Rows[Index1];
double zVal = Convert.ToDouble(row[zColName]);
double yVal = Convert.ToDouble(row[yColName]);
surface.Add(xVal, yVal, zVal);
}
}
//surface.CheckDataSource();
surface.UseColorRange = false;
surface.UsePalette = true;
surface.PaletteStyle = Steema.TeeChart.Styles.PaletteStyles.Rainbow;
surface.PaletteSteps = 10;
surface.Title = lineTitleName;
//surface.Color = lineColor;
this.Legend.CheckBoxes = true;
this.Legend.Visible = false;
this.Series.Add(surface);
if (lastAxis != null)
{
lastAxis.Visible = true;
}
if (this.Series != null)
{
this.Series[this.Series.Count - 1].GetHorizAxis.Title.Caption = horAxisTitle;
this.Series[this.Series.Count - 1].GetHorizAxis.Automatic = true;
this.Series[this.Series.Count - 1].GetHorizAxis.Visible = true;
////this.Series[this.Series.Count - 1].GetVertAxis.Automatic = false;
this.Series[this.Series.Count - 1].GetVertAxis.Title.Caption = vertAxisTitle;
this.Series[this.Series.Count - 1].GetVertAxis.Title.Visible = true;
if (labelSelect == true)
{
this.Series[this.Series.Count - 1].Active = true;
}
else
{
this.Series[this.Series.Count - 1].Active = false;
}
this.Series[this.Series.Count - 1].GetSeriesMark -= new Series.GetSeriesMarkEventHandler(point_GetSeriesMark);
this.Series[this.Series.Count - 1].GetSeriesMark += new Series.GetSeriesMarkEventHandler(point_GetSeriesMark);
this.Series[this.Series.Count - 1].ValueFormat = "#,##0.000,000,000,###";
this.Axes.Bottom.Labels.ValueFormat = "#,##0.000,###";
this.Axes.Left.Labels.ValueFormat = "#,##0.000,###";
}
}
void point_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
{
string SeriesValue = string.Empty;
if (!string.IsNullOrEmpty(e.MarkText))
{
SeriesValue = series.Title + " = "+ e.MarkText;
e.MarkText = SeriesValue;
}
else
{
e.MarkText = series.Title;
}
}
Teechart Product version - 4.1.2014.8122
Code: Select all
//Pass loaded data table list as mentioned in previous post
foreach(int index =0;index<DateSet.count,index++)
{
Func(table[index],table[index].col1,table[index].col2,table[index]col3);
}
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Urngent:Memory issue while surface graph plot
The attached file here: contains a Windows Form which here runs without throwing an exception. Does it run without generating an exception at your end? If it does, can you please modify it so I can reproduce your issue here?Alias wrote:If you still need sample example I will create soon. But please send me link of your sample example for surface graph as above.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Urngent:Memory issue while surface graph plot
Hi Chirstopher,Christopher wrote:The attached file here: contains a Windows Form which here runs without throwing an exception. Does it run without generating an exception at your end? If it does, can you please modify it so I can reproduce your issue here?Alias wrote:If you still need sample example I will create soon. But please send me link of your sample example for surface graph as above.
Thanks for your sample. I have modified and attached (Form1.zip)the same, now it generates the memory exception. It contains Form1. Plz add to your project. When you run the application you will get Form with button 1 and tchart panel. Click on button1 and wait for some time till exception is generated. Please revert if you want more info regarding exception.
Thanks.
- Attachments
-
- Form1.zip
- Sample example with memory exception
- (3.99 KiB) Downloaded 1286 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Urngent:Memory issue while surface graph plot
Hello,
This error occurs on the first Surface series created, that is, it is reproducible with this change:
In the source code, the exception is thrown here:
This error is most likely due to the fact that, by default, "Arrays greater than 2 GB in total size are not enabled" as is specified here.
Here, setting <gcAllowVeryLargeObjects> to true inhibits the throwing of this error.
This error occurs on the first Surface series created, that is, it is reproducible with this change:
Code: Select all
//for (int i = 0; i < 60; i++)
//{
AddSuface(CreateDataTable(x, y, z), x, y, z);
//}
This error is most likely due to the fact that, by default, "Arrays greater than 2 GB in total size are not enabled" as is specified here.
Here, setting <gcAllowVeryLargeObjects> to true inhibits the throwing of this error.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Urngent:Memory issue while surface graph plot
Hi Christopher,Christopher wrote:Hello,
This error occurs on the first Surface series created, that is, it is reproducible with this change:
In the source code, the exception is thrown here:Code: Select all
//for (int i = 0; i < 60; i++) //{ AddSuface(CreateDataTable(x, y, z), x, y, z); //}
This error is most likely due to the fact that, by default, "Arrays greater than 2 GB in total size are not enabled" as is specified here.
Here, setting <gcAllowVeryLargeObjects> to true inhibits the throwing of this error.
I tried below change in the sample application. But the error is still reproducible. Please try at your side with the sample application provided.
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
</runtime>
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Urngent:Memory issue while surface graph plot
As I said, I can't reproduce the error on this machine with gcAllowVeryLargeObjects set to true.Alias wrote: I tried below change in the sample application. But the error is still reproducible. Please try at your side with the sample application provided.
<runtime>
<gcAllowVeryLargeObjects enabled="true" />
</runtime>
More generally, this issue is unavoidable, in a sense. There will always be a time when adding a sufficient number of elements into an array will cause an "out of memory exception". Given that a (1000, 1000) surface series is of too high a pixel resolution to be painted on a screen the size of a computer screen, reducing it to (100, 100) will have no impact on its visual rendering.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |