Loading is slow on Android
See original GitHub issueHi Henning,
Thanks for this great library, just what we’ve been looking for!
We’ve tried implementing this in our app, but it seems to load slow on Android. After some debugging we’ve located the issue in PickerView.java
Both in setMode and setLocale you call the applyOnAllWheels
method, and we’ve measured this to take between 200 and 400 milliseconds each time on the emulator. They are of course faster on a device, but its still too slow in a production build. If commenting these out, the view loads fast (except it won’t work of course). I’m not sure how to solve that, but maybe you have an idea?
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
Speed up a slow Android device - Google Support
Restart your phone normally & check apps · Restart your phone. · One by one, remove recently downloaded apps. Learn how to delete...
Read more >Why Is My Android Slow? 3 Ways to Troubleshoot Your Device
If your Android is running slow, chances are the issue can be quickly fixed by clearing out excess data stored in your phone's...
Read more >Why is my Android slow? 8 ways to troubleshoot your phone
1. Free up storage space · 2. Uninstall unused Android apps · 3. Change system animation speed · 4. Restart your phone ·...
Read more >Why is My Android Running So Slow? - Technipages
If you have loaded your Android with tons of apps and data, it can slow down the device significantly. Check how much memory...
Read more >Speed up your slow Android phone with this one trick
Speed up your slow Android phone with this one trick · Clear web browser cache. You can manually clear out the cache on...
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
Just a note to people who get here because they are still experiencing jankiness and slowness even after v2.0.3, check if (and what) you are passing in the
maximumDate
andminimumDate
props.I was passing a date 100 years ago and it was taking several seconds to load.
Anyways, thanks so much for the work guys! 🎉
@tunaSalad2406 I have made some improvements that I think will resolve your issue. I would really appreciate if you would like to try it out and let me know if it solved your issue 🙂
Do the following to try it out:
Change the line in your package.json to:
"react-native-date-picker": "henninghall/react-native-date-picker#performance"
npm install
oryarn
rm -rf node_modules/react-native-date-picker/example && rm -rf node_modules/react-native-date-picker/example-cocoapods
react-native run-android