Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance Issues with Large Amounts of Data #118

Open
MonliH opened this issue Aug 23, 2021 · 4 comments
Open

Performance Issues with Large Amounts of Data #118

MonliH opened this issue Aug 23, 2021 · 4 comments

Comments

@MonliH
Copy link

MonliH commented Aug 23, 2021

Thanks for the awesome library! It's incredibly easy to use and looks great! However, the drag to scroll functionality is very sluggish with large (e.g., 4k+) amounts of data. Is there a way to speed this up somehow?

If the chart gets redrawn every time the cart is scrolled, then I'd see why there's this performance problem. I'm not sure how it's implemented internally, but it could be wise to draw, say the entire chart, then wrap things in a scrollview.

Here is a video showing the slow performance on an iPhone 7:

Slow.mov

I am scrolling horizontally continuously, but the changes are taking at least a second to register. The initial load also takes a noticable amount of time.

@bekir-arkulpa
Copy link

bekir-arkulpa commented Sep 15, 2021

Also having the same problem . with large amount of data chart becomes laggy while scrolling, is there not a possibility to render the chart once completly and wrap it in a scrollview ? If someone got it to work would appreciate an answer , because i love this libraries customizability , we customized everything and even made it zoomable with setViewport origin function and zooming right in the middle of both x axis points with Offset prop with customized Chart component and only this performance issue is worrying us.

@MonliH
Copy link
Author

MonliH commented Sep 19, 2021

For other people with the same issue, we decided to switch to react-native-svg-charts, wrapped in a ScrollView.

It works perfectly, and the performance is much better (completely smooth scrolling). The poor performance is seriously a deal breaker here.

@wibimaster
Copy link

I got a 1 second lag' with 31 entries...

@MonliH Can you share (privately ?) a tutorial for your smooth solution ?

@bekir-arkulpa
Copy link

we switched to victory native, they have a extra section for performance called zoom in large data sets in docs.
Zoom behaviour sucks with pinch to zoom with fingers but we switched it with + - buttons to zoom and it works pretty well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants