Hi Michal,
Yes, several enhancements were done for the first version and recently additional improvements have been implemented and will be included in the next v3 maintenance release, which we expect to be ready soon.
Below there's the code we used for the tests (very similar to the code I originally sent you) and the results I obtained here using Points series are 9671.875 milliseconds in version 2 and 4875 milliseconds in version 3.
For completeness, even you explicitly asked for Points series, we have also run the tests using FastLine series. FastLine took 1500 milliseconds in v2 and 625 milliseconds in v3.
Also please notice that in all test we used our latest v2 and v3 sources.
Code: Select all
// number of points we'll be displaying
const int maxpoints = 500000;
private void button1_Click(object sender, EventArgs e)
{
double[] myX = new double[maxpoints];
double[] myY = new double[maxpoints];
System.Random r = new System.Random();
double tmp = r.NextDouble() * 10000;
for (int t = 0; t < maxpoints; t++)
{
tmp += r.Next(100) - 49.5;
myX[t] = t;
myY[t] = tmp;
}
// now add points to series
points1.Add(myX, myY);
}
private void Form1_Load(object sender, EventArgs e)
{
// Prepare chart for maximum speed:
tChart1.Aspect.ClipPoints = false;
tChart1.Header.Visible = false;
tChart1.Legend.Visible = false;
tChart1.Axes.Left.AxisPen.Width = 1;
tChart1.Axes.Bottom.AxisPen.Width = 1;
tChart1.Axes.Bottom.Labels.RoundFirstLabel = false;
tChart1.Aspect.View3D = false;
tChart1.Aspect.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed;
tChart1.Panel.Gradient.Visible = false;
//tChart1.Walls.Back.Gradient.Visible = false;
tChart1.Walls.Back.Visible = false;
// set ordering to none, to increment speed when adding points
points1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None;
// initialize axis scales
tChart1.Axes.Bottom.SetMinMax(1, maxpoints);
points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.SmallDot;
}
private long startTime, now;
private void tChart1_BeforeDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
startTime = DateTime.Now.Ticks;
}
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
//calculate elapsed time
now = DateTime.Now.Ticks;
TimeSpan elapsedTime = new TimeSpan(now - startTime);
label1.Text = "Elapsed time: " + elapsedTime.TotalMilliseconds.ToString() + " ms";
}