Hi
We are facing performance issue with Teechart. Follwoing are the details for this issue
1. We have around 300 series in a chart.
2. Each series have around 1000 points. This is required, we cant reduce the points for each series.
3. We are facing performanc hit while manipulating details of a series which requires paiting.
Please see the sample applicaiton attached herewith. Click on the OK button, and naviagte in the list. you will observer perfomance hit. Out client says that this performance hit was not there in ther earlier applicaiton which had other chart like NI chart.
Please look into this issue on very high priority issue as this issue has become a show stopper for market release of our product
With Rergards
Vivek
EXFO India
Performance issue with Teechart.
Performance issue with Teechart.
- Attachments
-
- pocTchart.zip
- (13.4 KiB) Downloaded 475 times
Re: Performance issue with Teechart.
Hello vivek,
I could reproduce your problem and I recomend that see article real-time charting, that give some ideas for improve performance. On the other hand, I modified your code, because went faster then previous code. I assigned values direcly X and Y using arrays and without sort, also if you want to works faster you can order data previously and then assign values to chart series.
See nex code and check that works faster. In code there are a counter to calculate time it takes.
I hope will helps.
Thanks,
I could reproduce your problem and I recomend that see article real-time charting, that give some ideas for improve performance. On the other hand, I modified your code, because went faster then previous code. I assigned values direcly X and Y using arrays and without sort, also if you want to works faster you can order data previously and then assign values to chart series.
See nex code and check that works faster. In code there are a counter to calculate time it takes.
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
graph.Chart.Aspect.View3D = false;
graph.Axes.Bottom.Maximum = 100;
stopWatch = new System.Diagnostics.Stopwatch();
graph.AfterDraw += new Steema.TeeChart.PaintChartEventHandler(graph_AfterDraw);
}
private System.Diagnostics.Stopwatch stopWatch;
private void button1_Click(object sender, EventArgs e)
{
Random r;
FastLine f;
double[] x1;
double[] y1;
listBox1.Items.Clear();
graph.Series.Clear();
stopWatch.Reset();
stopWatch.Start();//Calculate Time;
graph.AutoRepaint = false;
for (int k = 0; k < 300; k++)
{
f = new FastLine();
f.Color = Color.Silver;
r = new Random();
x1 = new double[1000];
y1 = new double[1000];
f.XValues.Order = ValueListOrder.Ascending;
for (int i = 0; i < x1.Length; i++)
{
x1[i] = i * r.NextDouble();
y1[i] = i;
}
f.XValues.Value = x1;
f.YValues.Value = y1;
f.XValues.Count = x1.Length;
f.YValues.Count = y1.Length;
listBox1.Items.Add(k);
graph.Series.Add(f);
}
graph.AutoRepaint = true;
Application.DoEvents();
stopWatch.Stop();//Stop calculate time.
}
void graph_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//calculate elapsed time
TimeSpan elapsedTime = stopWatch.Elapsed;
string total = elapsedTime.TotalSeconds.ToString();
this.Text = "Elapsed time: " + total + " s";
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
this.graph.Chart.Series[listBox1.SelectedIndex].Color = Color.Red;
}
Thanks,
Best Regards,
Sandra Pazos / 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: Performance issue with Teechart.
hi sandra,
thanks for the reply,
we tried your solution but the performance is not improved as we expected.
the performance for National instrument component is much better than Tee chart in the same scenario.
please suggest us any other solution so that we can match with the performance of national Instrument component.
Thanks in Advance.
thanks for the reply,
we tried your solution but the performance is not improved as we expected.
the performance for National instrument component is much better than Tee chart in the same scenario.
please suggest us any other solution so that we can match with the performance of national Instrument component.
Thanks in Advance.
Re: Performance issue with Teechart.
Hi Please find the attached sample code for Pradip's post. We have tried to replicate the problem.
- Attachments
-
- Navigation Issue.zip
- (234.18 KiB) Downloaded 478 times
Re: Performance issue with Teechart.
Hello vivek,
I couldn't execute your project .exe, don't works. Please you can send a project, because we can reproduce here.You can attach your project directly in the post.
Thanks
I couldn't execute your project .exe, don't works. Please you can send a project, because we can reproduce here.You can attach your project directly in the post.
Thanks
Best Regards,
Sandra Pazos / 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 |