You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Touch animations begin to slow, after multiple touches - on device, not simulator (iOS) #9408
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?
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.
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.
Activity
getnashty commentedon Aug 15, 2016
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.
zevmo commentedon Aug 15, 2016
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.
getnashty commentedon Aug 15, 2016
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.
getnashty commentedon Aug 16, 2016
Closing this ticket, I would recommend LayoutAnimation over the Animated API for any similar issues.