Large data set animation lag
See original GitHub issueIssue Description
The line chart starts to drop some frames if the data set gets large on iOS. Under 45 items never drops frames. Under 55 is pretty reliable, but occasionally will. Once you get over 70, it’s consistently dropping frames on the UI thread when animating. I wonder if there could be optimizations for this.
Possible ideas:
- Investigate the fastest way to do a for loop, since we’re looping through lots of data (
for (let i = 0)
vs.map
) - Could we turn the
data
array into a shared value under the hood? - Since
parse(path)
gets used in a few places, maybe we should offload that to the provider to reduce the number of times it gets calculated. - Fork the redash helpers and try to optimize them if possible.
These are just a few off-hand ideas. I would have to do more digging.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:8 (8 by maintainers)
Top Results From Across the Web
gnuplot slow when plotting large data set as animation
I'm trying to make an "animated" plot a lot of data (the position of 1000 particles) from a big text file with a...
Read more >How to create high-performance CSS animations - web.dev
This guide teaches you how to create high-performance CSS animations. See Why are some animations slow? to learn the theory behind these ...
Read more >How much lag by looping database animation?
However, the initial load will cause some lag, depending on how large the animations are. I pre-loaded two animations for use within a...
Read more >Laggy animations - GSAP
Some things you could do is to maybe add a slight rotation: 0.01 to your tween, and or also using autoAlpha instead of...
Read more >Tips for improving the performance of your presentation
Reduce the number of transitions and complex animations in your presentation. ... If you have many files in your TEMP folder, it can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Relevant: https://github.com/software-mansion/react-native-reanimated/issues/1302
Also: https://github.com/sbycrosz/d3-interpolate-path/tree/feat/react-native-reanimated-support
Been investigating making
data
a shared value under the hood. Seems like this problem is really not trivial as reanimated doesn’t really have first-class support for external library imports. We would probably have to find a way to convert libraries such asd3-scale
andd3-shape
to be worklet compatible. Will probably need a bit more time to look into this one.