Jump to content
Software FX Community

CHART_HIDDEN and default values


User (Legacy)

Recommended Posts

Hi,

I have a very large series of data, and several small series.

It takes a very long time to load the chart because I have to recurse

through all the series for as many points as are in the large large

series and set all the point values to CHART_HIDDEN.

Is there some way of avoiding this? Perhaps I can open the datachannels

with default values? Or better yet, allow different series to be

different lengths?

The time to load a chart is getting silly, and can take minutes (!!)

where a smaller large series is seconds as its O(n^2) where n is number

of points in the large series...

Paul

Link to comment
Share on other sites

How many points are you talking here ?? Even 1,000,000 points takes about 5

seconds to load from VB (and about 10 seconds to draw).

You must be doing something else besides setting just the data. Please check

the KB for tips on improving Chart FX performance.

In particular check to see if you are :

1) Allocating the right number of points from the beginning. Reallocs can be

costly as data has to be moved.

2) If you are assigning labels, there are some flags like CSE_FASTLEGENDS

that will help you.

--

FP

Software FX, Inc.

Link to comment
Share on other sites

For this particular chart, i'm talking a little under 580,000 points.

I was using COD_UNKNOWN, and changed it to a fair estimate of the number

of points in the chart, and that has improved the speed a lot.

How are the reallocs handled? I notice that even when I have guessed too

low, extra points are automatically added to the chart. Does a realloc

affect all the data channels at the same time? Or just each one at a

time? Does a realloc affect all the series at once?

Is the a possibility of using different # points in each series? Only one

of my series is big, and I'd guess in total only 7000 points are actually

used... I have to set the rest to HIDDEN.

The loop to set to HIDDEN is quite slow, but within the times you

mentioned (ie 10-20 secs).

Thanks,

Paul

In article <Wbs7V4AXBHA.1756@webserver1.softwarefx.com>, "SoftwareFX

Support" <support@softwarefx.com> wrote:

> How many points are you talking here ?? Even 1,000,000 points takes

> about 5 seconds to load from VB (and about 10 seconds to draw).

>

> You must be doing something else besides setting just the data. Please

> check the KB for tips on improving Chart FX performance.

>

> In particular check to see if you are :

>

> 1) Allocating the right number of points from the beginning. Reallocs

> can be costly as data has to be moved.

> 2) If you are assigning labels, there are some flags like

> CSE_FASTLEGENDS that will help you.

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Most of the times making two passes across the data and counting exactly how

many points are going to be in the chart is faster than using COD_UNKNOWN or

growing the chart.

Reallocs are made every time the memory allocated is insufficient, this

depends on the OS block size (usually 4K = 512 points).

All memory that depends on the number of series and points is adjusted

(re-allocated) in the CloseData call.

I don't see a faster way of setting all points to hidden, but in no reallocs

occur, you should be able to initialize 580,000 in less than 3 seconds (I

tested this in a 1Ghz Pentium).

--

FP

Software FX, Inc.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...