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.

Calendar opens slower in android

See original GitHub issue

Description

Calendar is opening really slowly in android. We’re resorting to wrapping it in a view with an onLayout handler and showing a loader for the calendar which is giving a really bad experience for our users

Expected Behavior

Calendar should open without any delay

Observed Behavior

Calendar takes 1-2 seconds to open. This only happens on android devices

Environment

Please run these commands in the project folder and fill in their results:

  • npm ls react-native-calendars: └── react-native-calendars@1.19.4
  • npm ls react-native: └── react-native@0.55.4

Also specify:

  1. Phone/emulator/simulator & version: Simulator - Nexus 5X

Reproducible Demo

<CalendarList
    disableMonthChange={true}
    pastScrollRange={0}
    futureScrollRange={6}
    scrollEnabled={false}
    horizontal={true}
    pagingEnabled={true}
    showScrollIndicator={true}
    markedDates={...}
    onDayPress={x => x}
    onDayLongPress={x => x}
  />

To show the loader we can wrap it in

<View onLayout={e => this.setState({ layout: e.nativeEvent.layout })}>
    {this.state.layout ? <CalendarList {...params} /> : <ActivityIndicator />}
</View>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:15
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
kuangyliangcommented, Apr 19, 2019

Does not work, it is still very slow

2reactions
debugpaicommented, Aug 23, 2018

Okay after adding the initialNumToRender prop the performance significantly improved. Raised a PR. Please check it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Calendar is so SLOW this month. Anybody else ...
Google Calendar has become SOOOOOOO SLOW, for the past few weeks or so. Opening an event, dragging and dropping an event, editing an...
Read more >
Calendar very slow to sync - Android Central Forum
If I open the Google Calendar app it syncs right away. However, I use an app called aCalendar+ and this app relies on...
Read more >
Slow opening of MaterialCalendarView - android
I am using MaterialCalendarView (https://github.com/prolificinteractive/material-calendarview) in my app. It is inside one of my fragments. When I open this ...
Read more >
Google Calendar not updating or slow to update
Our iCalendar feed from a resource, used to update a Google Calendar, is automatically updated every 15 minutes.
Read more >
Slow rendering - Android Developers
If your app suffers from slow UI rendering, then the system is forced to ... To perform a visual inspection, open your app...
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