Jump to content
Software FX Community

Re: Performance degradation of CFX98 for plots


User (Legacy)

Recommended Posts

Thanks for your help. We will look at this and let you know. Was your

project created in BCB3? Do you still have a copy?

TIA

Joao

Percy Dyer <Cfx98@softwarefx.com> wrote in message

news:aTddYrdaAHA.2400@sfxserver.softwarefx.com...

> Hi,

> I just create a new project with two series and 5000 points each, the time

> to plot the 10,000 points were 3 seconds with a 800MHZ, 128Ram.

> It could be possible the code is producing the delay in your project, to

> confirm I would suggest, just to check the speed, to create a new project

> and feed the chart with a double loop from 0 to 1 and from 0 to 4999 with

> ramdom data.

>

> --

> Regards,

>

> Percy Dyer

> Software FX, Inc. Tech Support

> ================================================

>

> "Joao Ferreira" <nop25278@mail.telepac.pt> wrote in message

> news:8lTkH9PZAHA.1692@sfxserver.softwarefx.com...

> > Hi

> >

> > WinNT4SP5, Pentium III 300MHz 256 Mb RAM, Borland C++ builder V. 3.

> >

> > I am using ChartFX98 for plotting results from an ecosystem model we are

> > developing. I have found that the plotting speed degrades as the

plotting

> > proceeds. For 5000 points, 2 series, in a trivial sample app we

developed

> to

> > illustrate the problem, the time in miliseconds taken to plot the points

> is

> > (in 500 point batches):

> >

> > 5417

> > 7761

> > 9724

> > 11616

> > 12589

> > 13950

> > 15913

> > 17715

> > 18747

> >

> > Even if we turn off message processing in the app, so the points are

only

> > displayed at the end of the plot (which we do not want), the numbers are

> > (for 10 series, each with 5000 points)

> >

> > 80

> > 200

> > 341

> > 450

> > 591

> > 771

> > 1032

> > 1522

> > 2323

> >

> > I am very worried about this, since we have invested a substantial

amount

> of

> > time (and money) in ChartFX as the graphics solution for this

application.

> >

> > I have taken the liberty of copying in a little code below.

> >

> > Many thanks for help/comments.

> >

> > regards

> >

> > J.G.Ferreira

> >

> > 1. Function which loops thru points

> >

> > for(int i=0; i < Samples->Count; i++)

> > {

> > SampleForm = (TForm1 *)Samples->Items[i];

> > if(SampleForm==NULL) continue;

> > SampleForm->AddPoint();

> >

> > Application->ProcessMessages();

> > }

> >

> > while ( Mode==STOP)

> > Application->ProcessMessages();

> >

> > if(Mode == RESET)

> > break;

> > // if (r % 50 == 0)

> > Application->ProcessMessages();

> >

> > 2. Function which calls CFX API

> >

> > void __fastcall TForm1::AddPoint()

> > {

> > long tickVal2;

> >

> > if(tickVal1 == 0)

> > tickVal1 = GetTickCount();

> > if(PointIndex == 0)

> > CFX->OpenDataEx(COD_XVALUES, SeriesCount, 1);

> > else

> > CFX->OpenDataEx(COD_XVALUES | COD_ADDPOINTS, SeriesCount, 1);

> >

> > for(int s=0; s < SeriesCount; s++)

> > {

> > CFX->XValueEx[s][PointIndex] = PointIndex;

> > CFX->ValueEx[s][0] = (s+1) * 10;

> >

> > CFX->ValueEx[s][0] = (s+1) * 10;

> > }

> > CFX->CloseData(COD_XVALUES | COD_SMOOTH | COD_REALTIME);

> >

> > if(PointIndex > 0 && (PointIndex % 500) == 0)

> > {

> > tickVal2 = GetTickCount();

> > Memo1->Lines->Add(IntToStr(tickVal2 - tickVal1));

> > tickVal1 = 0;

> > }

> >

> > PointIndex ++;

> > }

> >

> >

> >

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...