amcharts3 icon indicating copy to clipboard operation
amcharts3 copied to clipboard

Iterative rendering approaches

Open benwiley4000 opened this issue 6 years ago • 3 comments

Our users are sometimes rendering huge amounts of data and the rendering cost can grow high - sometimes multiple seconds, which is far too long for the page to be frozen and non-interactive. It can also mean wasted time spent rendering. If a user selects an option but quickly changes their mind, they will have to wait for the change to take effect and for a new chart to render before they can revert their choice.

I'm wondering about any approaches amcharts could take - or perhaps that exist already - for iterative rendering. In other words, rather than blocking the UI thread synchronously for the duration of the entire render, rendering computations take place in slices, between which the render yields to the event loop for I/O processing, etc. At the end, when all the slices have finished, the svg is placed in the DOM.

It would also be nice to be able to interrupt and re-start drawing between slices if the data or space requirements change.

Has any design or thought been invested into this? Thanks! 😃

benwiley4000 avatar Mar 02 '18 06:03 benwiley4000

Technically, such incremental processing already exists and is regulated by processCount and processTimeout settings.

I suggest you play around with the values for those settings to maybe figure out a solution.

That said, this applies to data processing only. So for very large data sets this might have a noticeable effect. However, once it goes from data processing to rendering, the freeze will happen if you have a lot of data points, no matter what.

I also suggest looking into Stock Chart. It does have automatic data point grouping which 100% solves the performance issue of displaying thousands of data points at a time.

Hope this helps.

martynasma avatar Mar 02 '18 06:03 martynasma

I'll take a look at each of those options. Thank you!

benwiley4000 avatar Mar 02 '18 07:03 benwiley4000

Are these two settings(processCount and processTimeout) also available on AmCharts 4?

maximinogomez avatar Aug 31 '20 23:08 maximinogomez