Hi !
I've a FastLine in a WebChart which contains 200.000 values.
It takes 8 seconds until it is displayed in my browser.
The most time is between Page_Prerender and Page_Unload.
Now I want to increase the performance, but I can't find the properties in the known Delphi-Article (FastPen, Clip, ...) in .NET Version of TeeChart.
What can I do ?
Best regards, Chris
ASP.NET FastLine Speed
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
We have observed that application performance varies depending on the machine load as well. However, code below took between 1 and 3 seconds plotting the chart. Notice that we used BeforeDraw and AfterDraw events for calculating consumed time as this is the time it takes to plot the chart and where the number of series points has influence as this doesn't affect in the WebChart construction.
Also, the fastest chart loading option is setting TempChart property to File. For further information about TempChart please read Tutorial 9 - TeeChart and WebChart and ASP.NET. You'll find the tutorials at TeeChart's program group.
We have done some tests here using the same development machine as a server to avoid network load problems. We used the code below for the tests and the application was using TempChart property set to Session.I've a FastLine in a WebChart which contains 200.000 values.
It takes 8 seconds until it is displayed in my browser.
The most time is between Page_Prerender and Page_Unload.
We have observed that application performance varies depending on the machine load as well. However, code below took between 1 and 3 seconds plotting the chart. Notice that we used BeforeDraw and AfterDraw events for calculating consumed time as this is the time it takes to plot the chart and where the number of series points has influence as this doesn't affect in the WebChart construction.
Also, the fastest chart loading option is setting TempChart property to File. For further information about TempChart please read Tutorial 9 - TeeChart and WebChart and ASP.NET. You'll find the tutorials at TeeChart's program group.
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
LoadTime = DateTime.Now.Ticks;
WebChart1.BeforeDraw += new Steema.TeeChart.PaintChartEventHandler(WebChart1_BeforeDraw);
WebChart1.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(WebChart1_AfterDraw);
int MaxPoints = 200000;
Steema.TeeChart.Chart ch1 = WebChart1.Chart;
ch1.Aspect.View3D = false;
ch1.Title.Visible = false;
ch1.Legend.Visible = false;
ch1.Axes.Left.AxisPen.Width = 1;
ch1.Axes.Bottom.AxisPen.Width = 1;
ch1.Axes.Bottom.SetMinMax(0, MaxPoints - 1);
Steema.TeeChart.Styles.FastLine fastLine1 = new Steema.TeeChart.Styles.FastLine(ch1);
fastLine1.AutoRepaint = false;
fastLine1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
fastLine1.FillSampleValues(MaxPoints);
}
private long BeforeDrawTime, LoadTime, now;
void WebChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//calculate elapsed time
now = DateTime.Now.Ticks;
TimeSpan elapsedTime = new TimeSpan(now - BeforeDrawTime);
Label1.Text = "Elapsed time BeforeDraw: " + elapsedTime.TotalMilliseconds.ToString() + " ms";
elapsedTime = new TimeSpan(now - LoadTime);
Label2.Text = "Elapsed time PreRender: " + elapsedTime.TotalMilliseconds.ToString() + " ms";
}
void WebChart1_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
BeforeDrawTime = DateTime.Now.Ticks;
}
Yes, those properties are not available in the .NET version for now.Now I want to increase the performance, but I can't find the properties in the known Delphi-Article (FastPen, Clip, ...) in .NET Version of TeeChart.
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 |
-
- Newbie
- Posts: 4
- Joined: Wed May 23, 2007 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
No, FillSampleValues is not the bottleneck as it ends up using Add(x,y).
No, FillSampleValues is not the bottleneck as it ends up using Add(x,y).
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 |