Closed theedov closed 2 years ago
Seeing the same.
CPU Spikes to 100% when scrolling.
I wonder if there’s a way we can optimize the charts on the overview page. I have not tested it on device.
Otherwise a toggle to switch between images of the graphs and actual graphs might be a solution?
Issue appears to be the List
deallocating cells and redrawing the charts when the user scrolls back into view.
Setting the List
to a ScrollView
where every chart is loaded and not released when scrolled out of view gives us a smoother experience.
I am wondering if there is a way to keep the List
however remove the cell reuse.
I looked into rendering an image of the graph with the imageRenderer on first launch and then putting that image instead of the graph. It works okay but I have not found an elegant solution, and it seems the scale is a bit off. Any other suggestions?
We can always just take the screenshots that are in the README and add them to the project instead 🤔
Potential solution perhaps, https://github.com/jordibruin/Swift-Charts-Examples/pull/52
Thoughts?
Good one for now! Thanks!
Is it just Xcode being Xcode, or the sample app is becoming laggy with all those charts? Testing on a simulator since I don't have iOS16 Beta installed.
https://user-images.githubusercontent.com/30866972/173708500-f03c7daa-c64f-4808-8160-f5380cf70053.mov