Eason Goodale
Eason Goodale

Reputation: 191

React native android transitions are really slow

My react native transitions (using the Navigator) are really slow, dropping the javascript thread frames to 0 for a second or two when the animation first starts, then picking up to ~20, then pausing halfway through, and then usually finishing relatively smoothly. I'm testing on a clean Galaxy Note 4, so it's not an emulator issue.

I'm rendering empty views with InteractionManager.runAfterInteractions and then a 5-element listview after the animation is complete. I've compiled the app for production and turned dev mode off.

Is this expected/the current state of things (hopefully to improve), or am I probably doing something wrong? If so, what's the best way to hunt that down? I have very little logic running.

If there isn't an easy solution, is there a way to disable animations on Navigator transitions?

Upvotes: 17

Views: 10468

Answers (3)

Chris Geirman
Chris Geirman

Reputation: 9684

in the ios simulator, command+T slows animations down. Android probably has something similar

Upvotes: 15

Idan Gozlan
Idan Gozlan

Reputation: 3203

Turn off chrome debugger, it makes animation really slow.

Upvotes: 36

mrcasals
mrcasals

Reputation: 1171

The official docs have a page on Performance, you might want to check that. It has a section talking specifically about slow Navigator transitions.

Also, I've noticed that React Native v0.14.0 with Chrome debugger enabled is really slow, try disabling it first.

Navigator transitions are in the NavigatorSceneConfigs module, but it doesn't seem to have an animationless transition.

Upvotes: 4

Related Questions