[RadCartesianChart] Having navigating from chart A to chart B to chart A kills the performance of chart A

1 Answer 76 Views
Chart
Sébastien
Top achievements
Rank 2
Iron
Iron
Iron
Sébastien asked on 29 Jun 2022, 03:00 AM

Hi,

I noticed this bad effect today. My main view has 3 RadCartesianChart:
- SplineSeries (Minute)
- BarSeries (Hour)
- BarSeries (Day)

If I opened the app then navigate to previous dates in the default chart, you can see that the performance is amazing. There is actually 1440 data points. Then if I go to the day view that has like 30 data points and go back to the first chart, the performance is super bad.

In the second part of the video, I do the same exercise except I do not even navigate to previous dates, it means that the default chart has NO data in it! However, going to day chart then minute chart, the performance goes bad.

Sorry for the "spam" of bugs lately.

Thanks
Sébastien

Didi
Telerik team
commented on 29 Jun 2022, 10:09 AM

Hi Sebastien,

I have watched the video and yes on it it seems there is a performance issue. I will need a repro project for this scenario to debug on my side. 

In addition you mentioned 3 charts - you use 3 separate chart definitions with one series in each chart or using 1 chart with 3 series and visualize different series when pressing the minute/day/hour buttons.

You can try clearing the source and reapplying it when switching the view. 

1 Answer, 1 is accepted

Sort by
0
Sébastien
Top achievements
Rank 2
Iron
Iron
Iron
answered on 29 Jun 2022, 02:19 PM
GOOD news!

My setup is 3 charts where each chart has 5 series each.

The issue is I was reusing the ObservableCollection for each chart. I was obviously clearing and adding the data points depending on the chart.

Conceptually, unless specified in the documentation, this feels like a bug, but creating a separate observable collection for each series fixes the issue.
Didi
Telerik team
commented on 30 Jun 2022, 07:39 AM

I am glad to hear creating a separate collections for each series solves the issue. I cannot say whether this is an issue in the control as I do not have a repro project with the exact setup where the issue occurs. 
Sébastien
Top achievements
Rank 2
Iron
Iron
Iron
commented on 30 Jun 2022, 01:35 PM

I updated the very simple sample to show you the bug.

1- Open the app
2- Click multiple times on "Go preview day", you will see that the speed is amazing
3- Click once on "Show day chart"
4- Click once on "Show minute chart" (array of 11 elements)
5- Click multiple times on "Go preview day" -> the performance is terrible

Didi
Telerik team
commented on 01 Jul 2022, 01:23 PM

Hi Sebastien, 

Thank you for the provided project. 

Strange but on my side when I run the project, and wait for few second the app terminates and the visual studio closes. 

I will research this further, maybe something in my settings and debug options.

Sébastien
Top achievements
Rank 2
Iron
Iron
Iron
commented on 01 Jul 2022, 01:37 PM

I relauched the app, clicked on the buttons and wait few minutes but it didn't crash. I'm on Windows 11  22H2 = 22621.169
Didi
Telerik team
commented on 04 Jul 2022, 08:38 AM

Hi Sebastien,

I have tested the app on another machine and it does not terminate. I reproduced the performance you mentioned but it also happens when just pressing the "Go preview day" button first. I assume the root of the behavior is because of the collection usage and its update. 

What I can suggest is clearing the data/updating the data/ or as you currently use different collections for different series. 

Tags
Chart
Asked by
Sébastien
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Sébastien
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or