Author |
Topic  |
|
marco
18 Posts |
Posted - 31 Oct 2003 : 12:22:19
|
Hi,
I'm running your multiline graph in real time and sending 6 channels of data aprox 4 times per sec. I'm having performance issues which I THINK are related to the dataset getting too large. the "TimeGroupDataset.YGroupData.Length" starts at 600. After 1 min is 1182, 1:30 aprox 1500, 2 min aprox 2000 ect.
is there a way that I can remove data from the begining of the array? I think this might help. My CPU usage percentage keeps going up as I graph data, but stays unchanged after 10 mins if I comment out the call to addNewPoints() and UpdateDraw().
regards,
Marco
|
|
quinncurtis
1164 Posts |
Posted - 31 Oct 2003 : 16:29:56
|
You want to delete data points from the beginning of the dataset. Sounds like you should use dataset method DeleteDataPoint. Or for a group data set you would use DeleteGroupDataPoints.
|
 |
|
marco
18 Posts |
Posted - 03 Nov 2003 : 11:10:11
|
Hi,
Given (MultilineGraph):
public void AddNewPoints(double[] dblPointsToDraw) { ChartCalendar xValue = (ChartCalendar)currentdate.Clone(); GroupPoint2D newdata= new GroupPoint2D(xValue, dblPointsToDraw);
c_Dataset.AddGroupDataPoints(newdata); intNumberOfPoints = c_Dataset.GetNumberDatapoints(); c_PTransform.AutoScale(c_Dataset,ChartObj.AUTOAXES_EXACT, ChartObj.AUTOAXES_EXACT); c_PTransform.SetTimeScaleStart(c_Dataset.GetTimeXDataValue(intNumberOfPoints-100));
c_XAxis.CalcAutoAxis(); c_YAxis.CalcAutoAxis(); //c_XAxisLab.CalcAutoAxisLabels(); c_YAxisLab.CalcAutoAxisLabels();
currentdate.Add(ChartObj.MILLISECOND,110); if(intNumberOfPoints > 100) { c_Dataset.DeleteGroupDataPoints(0); } }
after running program for a while, I still have about 8k every 5-10 seconds beeing used, so after an 30 mins... I keep adding 110 ms to the current date. I'm thinking that I might be making this array bigger also. Is this possible? If it is, can I "currentDate.remove()" time from the begining of the array? |
 |
|
quinncurtis
1164 Posts |
Posted - 03 Nov 2003 : 13:28:19
|
How are you measuring the amount of memory used by the dataset?
|
 |
|
marco
18 Posts |
Posted - 03 Nov 2003 : 15:26:44
|
Sorry to ass-u-me, leak comes from other section.
marco |
 |
|
|
Topic  |
|
|
|