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.

Loading is slow on Android

See original GitHub issue

Hi 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:closed
  • Created 5 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
donatoazcommented, Jan 18, 2019

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 and minimumDate 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! 🎉

1reaction
henninghallcommented, Apr 14, 2019

@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:

  1. Change the line in your package.json to: "react-native-date-picker": "henninghall/react-native-date-picker#performance"

  2. npm install or yarn

  3. rm -rf node_modules/react-native-date-picker/example && rm -rf node_modules/react-native-date-picker/example-cocoapods

  4. react-native run-android

Read more comments on GitHub >

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

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