Page 1 of 1

Whats best for fastline

Posted: Wed Sep 26, 2007 11:41 pm
by 9642659
I have TChart 2.0
Active X 5.0
Active X 7.0

I am using the FastLine series to update a chart every 1 seconds with upto 1000 points. The ActiveX 5.0 version does this using about 1-2% CPU time

The .net 2.0 implemtation does uses about 30% and degrades further to maybe 50% cpu usage when the total points added reach about 50000.

In both implementations I am manually (as in code) scroliing the display such that the x axis is not constantly scrolling as each indiviual points are added, i.e. when the chart fills up I move it left by 25%.

The problem I have is that the Active X version is implemented in good old VB, and the 2.0 version in C#

If I try and use the activeX version everything is very painful with respect to PInvoke not creating compatible method and properties, and in some case not at all, well at least i cant find them, ie how to turn the 3d off. Also the designer edited properties dont get save so everying has to be hand coded.

I really want to use 2.0 but before I just accept that your product is 10 X slower in the .net 2 environment is it worth upgrading to 3.0?

Also, in 2.0 when doing .ADD(XArray, YArray) all the previous points are deleted, my interpretation of Add is that it should 'add' data and not replace it.

I know the world is all web mad and that is obviously where you are putting most of your energies but there are still some of us out here where performance is important.

Please advise my best course of action. ie stick with the pain of active X in a .net environment or upgrade to 3.0, at least tell me if you have degraded fastline performance in the 3.0 compared to 2.0.

p.s. activeX 7 is slower than 5.0, I guess you slow it down with each release.

Other than that, excellent product, and it I will continue to use it for static data presentation.

A.

Posted: Thu Sep 27, 2007 9:18 am
by narcis
Hi YetAnotherForumName,
I am using the FastLine series to update a chart every 1 seconds with upto 1000 points. The ActiveX 5.0 version does this using about 1-2% CPU time

The .net 2.0 implemtation does uses about 30% and degrades further to maybe 50% cpu usage when the total points added reach about 50000.
.NET framework is widely known to be slower than Win32. However, you may improve your application's performance as told in the article I posted on this thread.
If I try and use the activeX version everything is very painful with respect to PInvoke not creating compatible method and properties, and in some case not at all, well at least i cant find them, ie how to turn the 3d off. Also the designer edited properties dont get save so everying has to be hand coded.
That's not true, with the ActiveX version you can also set most things at design-time and they persist at run-time as you can see in the VS.NET examples included with the ActiveX version, at for example: C:\Program Files\Steema Software\TeeChart Pro v8 ActiveX Control\Examples\Visual Studio .NET. Even some of v5 examples are all implemented at run-time, settings can also be made at design-time.

You can disable 3D like this:

Code: Select all

			axTChart1.Aspect.View3D=false;
I really want to use 2.0 but before I just accept that your product is 10 X slower in the .net 2 environment is it worth upgrading to 3.0?
In v3 several performance enhancements were included. You may want to test the fully functional evaluation version available here.
Also, in 2.0 when doing .ADD(XArray, YArray) all the previous points are deleted, my interpretation of Add is that it should 'add' data and not replace it.
When adding arrays to TeeChart all series values are replaced with new arrays provided. This happens with all TeeChart versions. You'll need to manually append the arrays and them to the series or may be better looping through the array and add points using AddXY.
I know the world is all web mad and that is obviously where you are putting most of your energies but there are still some of us out here where performance is important.
We are also concerned with performance and we try to enhance it on every TeeChart release.
Please advise my best course of action. ie stick with the pain of active X in a .net environment or upgrade to 3.0, at least tell me if you have degraded fastline performance in the 3.0 compared to 2.0.
You should evaluate all possibilities available, test v3 evaluation version and choose what fits best to your needs.
p.s. activeX 7 is slower than 5.0, I guess you slow it down with each release.
I'm reluctant about that. I've done a simple test (see code below) and it runs in almost the same time in v5 and v8. If you have a simple example project that proves that would you be so kind to send it to us? You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Code: Select all

Option Explicit

Dim start As Date

Private Sub Form_Load()
    Me.ScaleMode = vbPixels
    TChart1.Width = 600
    TChart1.Height = 400
    TChart1.AddSeries scFastLine
    TChart1.Series(0).FillSampleValues 1000000
    TChart1.Environment.InternalRepaint
End Sub

Private Sub TChart1_OnAfterDraw()
    TChart1.Header.Text.Clear
    TChart1.Header.Text.Add "Elapsed Time: " & CStr(Now - start)
End Sub

Private Sub TChart1_OnBeforeDrawChart()
    start = Now
End Sub
Other than that, excellent product, and it I will continue to use it for static data presentation.


Thank you very much!

Posted: Mon Oct 01, 2007 3:56 pm
by 9642659
3.0 is faster. Will upgrade now.

Also checked your tips link.

Thank you for your help.

Keep up the good work!

Posted: Mon Oct 01, 2007 4:04 pm
by narcis
Hi YetAnotherForumName,

You're very welcome! I'm glad to hear that helped.