react-native-calendars
react-native-calendars copied to clipboard
refactor: simplified isDateInRange func to improve large calendar lis…
When debugging to improve performance for a large calendar list ( eg. 15 months calendar list ), we found the isDateInRange not super optimize as we needed to complete some not-necessary loop action for each month each time we scroll through the calendar list.
Current isDateInRange |
Next isDateInRange |
|---|---|
As you can see, we can get rid of the not-necessary loop action
Great! Currently having issues rendering a calendar with more than 3 months of lookahead, without getting framedrops. So anything that makes re-renders faster would be really helpful!