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

Charts rendering to many views and dragging performance #789

Open
ftaibi opened this issue Aug 16, 2024 · 2 comments
Open

Charts rendering to many views and dragging performance #789

ftaibi opened this issue Aug 16, 2024 · 2 comments

Comments

@ftaibi
Copy link

ftaibi commented Aug 16, 2024

I dont have any issue with small data sets, but as soon as the data grows a bit theres up to 3000 and 6000 views sometimes and the performance of the app slow almost unresponsive

The data sets length is 300 points

    <LineChart
      data={sys}
      data2={dia}
      yAxisTextStyle={{color: text}}
      xAxisLabelTextStyle={{color: text}}
      width={width * 0.9}
      color1="skyblue"
      color2="orange"
      dataPointsColor1="skyblue"
      dataPointsColor2="orange"
      startFillColor1="skyblue"
      startFillColor2="orange"

    />

Check out the performance monitor
Screenshot 2024-08-16 at 10 55 58 AM
Screenshot 2024-08-16 at 10 55 48 AM

Screenshot 2024-08-16 at 10 51 57 AM
@ftaibi
Copy link
Author

ftaibi commented Aug 16, 2024

Hey Abhi could you consider using flat list to render the chart? in that case only the view on the screen will be rendered insteadd of all the chart. I patched the library and now I only have 400 view on the performance monitor.
Screenshot 2024-08-16 at 11 24 51 AM

@ftaibi
Copy link
Author

ftaibi commented Aug 16, 2024

I created a new bare react natvie project version 0.75 just two screens
Please check the demo see how navigating between screens is so slow

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-08-16.at.13.16.41.mp4

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

1 participant