镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Touch animations begin to slow, after multiple touches - on device, not simulator (iOS) #9408

Description

@getnashty

I'm having a strange problem. I have a little piece of UI that "spring" animates when the user taps it. It expands the first time, and shrinks the second time, and so on.

On the simulator for an iphone 6, it flies - works great.

On my device (running with debug=false & no remote JS debugging), the first time I tap it works fine, but I'm noticing if I tap it a lot, it seems like the taps start to build up and everything starts to lag. As in the animation will be responding to taps from seconds earlier. (To reiterate, this does not happen in the simulator).

I've put the animation in a requestAnimationFrame block (that I am clearing on unmount), but that didn't seem to fix it.

The memory for the app never seems to be above 90MB when this is happening, and CPU has jumped when the animation starts, but drops back down pretty quickly.

The only other thing I can think of, is that the video component is present.

Should I be trying to stop previous running animations on successive taps?

Activity

  1. getnashty commented on Aug 15, 2016

    @getnashty
    Author

    As a follow up, the lagging behavior seems to be quite sporadic. Sometimes it happens while something is loading in the app, and sometimes not. Sometimes it happens if a video is playing, and sometimes not. The lack of consistency is making it extremely challenging to address.

  2. zevmo commented on Aug 15, 2016

    @zevmo

    We have this same issue with one particular animation. After selecting it several times, the entire app begins to slow down, as if the rendering get flooded and is unable to recover.

  3. getnashty commented on Aug 15, 2016

    @getnashty
    Author

    I'm actually seeing frame rates drop as low as 35, and after strenuous testing can reproduce it on my simulator...


    @zevmo have you tried LayoutAnimation? thats what the docs seem to recommend, going to try now.

  4. getnashty commented on Aug 16, 2016

    @getnashty
    Author

    Closing this ticket, I would recommend LayoutAnimation over the Animated API for any similar issues.

  5. locked as resolved and limited conversation to collaborators on May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions