Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 dataset getting large???
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

marco

18 Posts

Posted - 31 Oct 2003 :  12:22:19  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
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.

Go to Top of Page

marco

18 Posts

Posted - 03 Nov 2003 :  11:10:11  Show Profile  Reply with Quote
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?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 03 Nov 2003 :  13:28:19  Show Profile  Reply with Quote
How are you measuring the amount of memory used by the dataset?
Go to Top of Page

marco

18 Posts

Posted - 03 Nov 2003 :  15:26:44  Show Profile  Reply with Quote
Sorry to ass-u-me, leak comes from other section.


marco
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07