Performance of Range and Interval properties on ChartAxis

I am having problems with the performance of the Range and Interval properties.

Going from a range of 10 seconds to a range of 6 hours on an X-axis take approx 3 seconds.

Going from a range of 1 second to a range of 6 hours on an X-axis take approx 60 seconds!!!!!. Even with no data displayed in the chart.

Please refer to the attached example.

I would very much appreciate a workaround for this.




ChartAxisRange_7e6cb8bd.zip

4 Replies

MS Morten Schou July 14, 2010 01:59 PM UTC

Well, using a profiler it is evident that going from a very short time span with a similar small tick interval to a very long time span results in a lot ot labels to be calculated.

By detecting which 'way' the time span is changed, the tick interval size can be set either before or after the axis' range to avoid too many labels to be calculated.


PI Poorani Idhaya Bala M.A Syncfusion Team July 16, 2010 05:46 AM UTC

Hi Morten ,

Thanks for choosing Syncfusion Products.

I have modified your sample to get better performance. Use the chart area's BeginInIt and EndInIt methods at the time of updating the range.

In this sample,

you are updating the range before updating the interval. Please set the interval value before updating the range. It will give you the better performance.

Please test this sample and let me know if you have any questions.

Thanks,
Poorani



ChartAxisRange_d587870f.zip


MS Morten Schou October 8, 2010 12:04 PM UTC

Hi Poorani,

Well, it did'nt make much difference.

If always setting the Interval before the Range, you will eventually get into a situation where the Interval is so small that a huge amount of tickmarks need be calsulated.

In the attached example, going from 6 hours range to 1 sec range (first click the 6 hours interval and the the 1 sec interval button) results in approx 108000 tickmarks to be calculated (see the debug output). The entire process takes about 30 seconds which is not acceptable.

It does not seem that teh BeginInit and EndInit has any effect.

It can be handled - as I mentioned earlier - by detecting which way the range is going to be changed and from this decide in which order Interval and Range should be set. More convenient would be to have a BeginUpdate and EndUpdate on the ChartAxis as can be found on the ChartSeries.

Regards,

Morten



ChartAxisRange_9b4dccba.zip


AR Abdul Rahman A.H Syncfusion Team October 12, 2010 01:21 PM UTC

Hi Morten,

Thanks for the update.

We have analyzed your sample. The time delay for rendering axis is because of initializing Interval before Range is initialized.

I have modified the sample and found all three cases works fine. Please find the modified sample attached here.

Regards,
Abdul Rahman







ChartAxisRange_fb0d3580.zip

Loader.
Up arrow icon