Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Section list android performance issues with blank data #28689

Closed
lander854 opened this issue Apr 19, 2020 · 6 comments
Closed

Section list android performance issues with blank data #28689

lander854 opened this issue Apr 19, 2020 · 6 comments
Labels
Component: SectionList Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@lander854
Copy link

lander854 commented Apr 19, 2020

Usign section list with a large data set like 10000-15000 there is a lot of blank time on screen mostly on android devices.

Problem occurs when usign ScrollToSection to scroll to end of list, I`m using a contact list, startting at A, then pressing Z the component scrolls but takes a long time to render content

in the example bellow CollapsibleHeaderSectionList is just a section list with a header component that colapses


     <View ref="view" style={[styles.container, this.props.style]}>
        <CollapsibleHeaderSectionList
          key="sectionlistComponent"
          clipHeader={true}
          removeClippedSubviews={true}
          viewabilityConfig={{
            minimumViewTime: 800,
          }}
          CollapsibleHeaderComponent={renderSearchHeader(
            buscaContatos,
            this.state.searchValue,
          )}
          headerHeight={70}
          statusBarHeight={0}
          maxToRenderPerBatch={6}
          windowSize={12}
          scrollEventThrottle={16}
          updateCellsBatchingPeriod={10}
          //   refreshControl={refresh()}
          getItemLayout={this.getItemLayout}
          ref={ref}
          keyExtractor={keyExtractor}
          {...props}
        />
        {sectionList}
      </View>

render component:

<View style={styles.container}>
        <TouchableWithoutFeedback onPress={() => this.setOnPress(contato)}>
          <View style={styles.row}>
            <View style={styles.avatar}>
              <Text style={{color: Colors.mediumText, fontSize: 18}}>
                {acronym}
              </Text>
            </View>
            <View
              style={{
                flex: 1,
                flexDirection: 'column',
                justifyContent: 'center',
                paddingLeft: '5%',
              }}>
              <Text style={styles.title}>{contato.nome}</Text>
              <Text>{contato.emailPrincipal}</Text>
            </View>
          </View>
          <View>
            <Divider style={styles.divider} />
          </View>
        </TouchableWithoutFeedback>
      </View>

system info


 OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 22.60 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.14.1 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 26, 27, 28, 29
      Build Tools: 19.1.0, 28.0.3, 29.0.2
      System Images: android-29 | Google Play Intel x86 Atom_64
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1

@react-native-bot react-native-bot added Platform: Android Android applications. Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels Apr 19, 2020
@github-actions
Copy link

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@lander854
Copy link
Author

Environment Information


 OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 22.60 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.14.1 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 26, 27, 28, 29
      Build Tools: 19.1.0, 28.0.3, 29.0.2
      System Images: android-29 | Google Play Intel x86 Atom_64
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Apr 19, 2020
@chrisglein
Copy link

Going to need a more specific repro for this to be actionable. It's possible the custom CollapsibleHeaderSectionList is interfering with the virtualization offered by base SectionList. Especially since you're seeing this in combination with a scroll to the end of the list (which method are you using to scroll to Z?).

@chrisglein chrisglein added Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. and removed Needs: Attention Issues where the author has responded to feedback. Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. labels Apr 29, 2020
@github-actions
Copy link

⚠️ Missing Reproducible Example
ℹ️ It looks like your issue is missing a reproducible example. Please provide a Snack or a repository that demonstrates the issue you are reporting in a minimal, complete, and reproducible manner.

@stale
Copy link

stale bot commented Jul 29, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 29, 2020
@stale
Copy link

stale bot commented Aug 8, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 8, 2020
@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: SectionList Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants