Spike: Investigate chart redraw performance
We are using ECharts more and more. I would like to investigate and improve our usage of the library, to see if there are any performance improvements we could make via configuration changes.
For the purposes of limiting the scope of the work, the first thing to look into would be performance around redraws.
When redrawing several charts at once, there is significant lag/jank even on fast computers:
initial load | resize page |
---|---|
chart_load_performance | dashboard_performance. |
I believe this is caused because the chart attempts to redraw too frequently. This could be improved by making better use of existing ECharts APIs, or rate limiting / debouncing the redraw calls.
This isn't a serious issue currently, but as we migrate more charts to ECharts and use more charts around GitLab, it will become more important. Making timeboxed investigation into optimisations now may give us some easy performance wins that could be applied to the base chart components and thus provide benefits for the future.