question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Large data set animation lag

See original GitHub issue

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:open
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jxomcommented, Nov 15, 2021

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 as d3-scale and d3-shape to be worklet compatible. Will probably need a bit more time to look into this one.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found