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

Laggy performance with windowSize with only 28 items #352

Closed
AndonMitev opened this issue Jan 23, 2023 · 1 comment · Fixed by #517
Closed

Laggy performance with windowSize with only 28 items #352

AndonMitev opened this issue Jan 23, 2023 · 1 comment · Fixed by #517
Assignees
Labels
bug Something isn't working

Comments

@AndonMitev
Copy link

I have following code

<SafeWrapper bgColor="muted.50" flex={1} alignItems="center">
      <TicketHeader currentTicket={currentTicket} totalTickets={eventDetails.length} />
      <GestureHandlerRootView>
        <Carousel
          windowSize={2}
          width={width}
          data={eventDetails}
          pagingEnabled
          snapEnabled
          scrollAnimationDuration={1000}
          onSnapToItem={onSnapToItem}
          panGestureHandlerProps={{
            activeOffsetX: [-10, 10],
          }}
          renderItem={({ item, index }) => <TicketDetailsScreen nftDetails={item} key={index} />}
        />
      </GestureHandlerRootView>
    </SafeWrapper>

and navigating between items is super slow even if i swipe faster i can see white screen for some amount of time do you have any ideas how i can optimize it? Current stack

"react-native": "0.69.6",
"react-native-reanimated-carousel": "3.0.6",
"react-native-qrcode-svg": "6.1.2"
@AndonMitev AndonMitev added the bug Something isn't working label Jan 23, 2023
@oliverloops
Copy link
Collaborator

I'm checking out performance issues. let me see and upload an update

dohooo added a commit that referenced this issue Dec 26, 2023
Before, even if the limit of the number of render is set, it will render one more layer of
BaseLayout, which makes the performance can not be maximized, and now the optimization makes
BaseLayout will not render any more, even if the number of data is 1 million, it will only render
the specified amount of render. Performance has improved dramatically.

fix #352, fix #362, fix #258, fix #478
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants