meliorence / meliorence/react-native-snap-carousel

Using LottieAnimation and fading caused Carousel to become extremely laggy/buggy on Android

Open
#459 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Is this a bug report, a feature request, or a question?

Bug report

Have you followed the required steps before opening a bug report?

(Check the step you've followed - replace the space character between the square brackets ([]) by an x.)

Have you made sure that it wasn't a React Native bug?

Might be to do with ScrollView, but the issue only arrised when adding fading between slides.

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

Bug only present on Android devices with version 7.X.X

Is the bug reproducible in a production environment (not a debug one)?

Yes

Environment

Environment:
React: 16.0.0-beta.5
React native: 0.49.2
react-native-snap-carousel: 3.3.4

Target Platform:
Android (7.0)

Expected Behavior

I would expect a double swipe would move the carousel twice.

Actual Behavior

Carousel shows text of 3rd slide, but after LottieAnimation loads (seemingly) carousel springs back to 2nd slide. Also, it is easily reproducible when I swipe quickly for my whole renderItems content to disappear. Very strange behaviour. Also, the whole carousel is generally very laggy to the point it is barely usable.

Reproducible Demo

(Paste the link to a Snack example in which the issue can be reproduced. Please follow the guidelines for providing a Minimal, Complete, and Verifiable example.)

Steps to Reproduce

(Write your steps so that anyone can reproduce the issue in the Snack demo you provided.)

  1. Create a carousel with a LottieAnimation and a piece of text for each slide
  2. Include at least 3 slides
  3. Double swipe quickly
  4. Swipes are laggy and content "springs" back to the 2nd slide - Wrong (we expect it to stay on the 3rd slide)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or reproducible demo is provided. Start by reading README.md, doc/KNOWN_ISSUES.md, and doc/CUSTOM_INTERPOLATIONS.md, then reproduce the Android 7.0 case with LottieAnimation, fading, and rapid swipes. Done means the carousel remains responsive, content does not disappear, and a double swipe reaches the third slide without springing back.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript, react-native
Domain
mobile, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.