TeeChart 7.07: Execution time of series.addxy method
Posted: Wed Aug 30, 2006 1:36 pm
Hi Folks,
i run into a very strange behaviour of the pointseries.addxy method.
I read time series from a textfile. To give you an idea about the speed: I read 130000 text lines containing the values for 9 different series in about 20 s. Data is added using the addxy method to the 9 series.
Then i let the user choose two series that shall be tested for their correlation against each other. In order to do that i open a new chart, create a pointseries and and use the addxy method to add values to the new series. I take the y-values from one of the original series to make them the x-values of the new series and i take the y-values of the second original series to make them the y-values of the new series, just as one does to check for a correlation. However, this needs 7 minutes and 25 s to add 130000 point to this SINGLE series!!
As if this were not already strange enough: I made me a progress bar and see that adding data is SOMETIMES faster and SOMETIMES slower.
As far as I can judge from now the ONLY difference between reading data from the file and adding data to the correlation series is that with the data file the x-values are in a strictly ASCENDING order (because these are time series) while with the correlation series the x-values as well as the y-values can go up and down. To check that, I added artificial data with the x-values in strictly ascending order to the correlation series. For 130000 points that was SO blindigly fast that I had difficulties to measure it with a stop watch (a few hundred ms).
What can I do to speed things up???? 7 minutes is inacceptable!
Please note that in both cases the autorepaint property of the charts was turned off, so drawing speed is not the matter.
TIA for your help
Ulrich Bangert
i run into a very strange behaviour of the pointseries.addxy method.
I read time series from a textfile. To give you an idea about the speed: I read 130000 text lines containing the values for 9 different series in about 20 s. Data is added using the addxy method to the 9 series.
Then i let the user choose two series that shall be tested for their correlation against each other. In order to do that i open a new chart, create a pointseries and and use the addxy method to add values to the new series. I take the y-values from one of the original series to make them the x-values of the new series and i take the y-values of the second original series to make them the y-values of the new series, just as one does to check for a correlation. However, this needs 7 minutes and 25 s to add 130000 point to this SINGLE series!!
As if this were not already strange enough: I made me a progress bar and see that adding data is SOMETIMES faster and SOMETIMES slower.
As far as I can judge from now the ONLY difference between reading data from the file and adding data to the correlation series is that with the data file the x-values are in a strictly ASCENDING order (because these are time series) while with the correlation series the x-values as well as the y-values can go up and down. To check that, I added artificial data with the x-values in strictly ascending order to the correlation series. For 130000 points that was SO blindigly fast that I had difficulties to measure it with a stop watch (a few hundred ms).
What can I do to speed things up???? 7 minutes is inacceptable!
Please note that in both cases the autorepaint property of the charts was turned off, so drawing speed is not the matter.
TIA for your help
Ulrich Bangert