react-native-paper-dates
react-native-paper-dates copied to clipboard
Takes a while to load dates
I am using hermes and polyfill, at first I was using another locale but I changed it back to en but it doesn't seem to fix it. I also thought that it might be the emulator but I have tried on real devices and the problem is still there
I was about to open an issue for that :sweat_smile:
This issue is very noticeable in lower-end devices such as iPhone 5s
Example with production bundle
Dev env ( It's taking more than 2s )
Is it really necessary to load 4 months at once? wouldn't be better to render only the current one?
Interesting will be a nice case to improve performance since as far as I know I have tried almost every optimisation possible. I hope React Native Fabric will improve things...
Maybe we can indeed render less on low-end devices but we need to at least render 3 months because it will be too much white when scrolling else.
@RichardLindhout how about rendering the current month in the first render and then render the other 3 right after?
I think we could try to wrap a function responsible for rendering the other 3 months with InteractionManager.runAfterInteractions
@brunohkbx hm that is interesting but in my case I was not loading multiple months as it still load when I change to next month
I think the rendering needs to te be faster as this will bite back when we scroll down
Let's rewrite it in Flutter :-P
Maybe we could detect the performance of the device and edit the amount of months loaded, because I also want fast scrolling so maybe it's a good idea to only 1 month on smaller screens
Indeed we should not need to load 4 months at once, it also seems like the all 4 month are re-rendered when user scrolls while only new ones should reload
I've improved some things in v0.4.5, I would also recommend using Hermes on Android.
I am using Expo with Hermes (and polyfills) and still seeing very slow loading performance 🤷
Is it only on my end, ,or does this continue to be an issue?
Well still an issue for me..
I think we could optimize using the native view / text directly. See https://github.com/callstack/react-native-paper/issues/4157 cc: @iM-GeeKy