WhoBuilt

Performance Does Matter - Making Your React-Native App Fast

Oct 21, 2020· 39 min· 6.6K views·Watch on YouTube

Speaker

Omri Bruchim, who leads the mobile platform at Wix and works on React Native architecture and performance, shares app speed practices at React Native EU 2020.

Why performance matters

Bruchim links app speed to retention, ratings, and revenue, citing research that each 1% reduction in startup time can raise retention by 0.27%. He says teams should measure performance on users’ real devices, noting that 35% of Wix’s user base used devices more than two years old.

Improve startup and bundle loading

Bruchim recommends Hermes on Android for faster launches, interactions, and lower memory use; Wix saw startup improve by up to 50% on some devices. He advises inspecting bundle contents, removing unused or oversized dependencies such as Moment when simpler date operations suffice, and using RAM bundles or Metro inline requires to load code as needed. Inline requires improved startup by 20% on iOS in Wix’s case.

Reduce unnecessary work in the app

He recommends caching data and images, showing cached content while refreshing, and fetching only what a screen needs. For rendering, he suggests preventing avoidable updates and giving users immediate loading feedback with loaders or skeletons. Using the native animation driver can reduce bridge traffic, though its supported properties include transforms and opacity.

Choose native integrations and explore JSI

Bruchim says JavaScript libraries can add bridge traffic, so teams should consider native implementations where available. He describes JSI as a way for JavaScript and native code to communicate directly without serializing JSON messages, while noting that it was not yet production-ready or well documented at the time of the talk.

Measure performance across devices

He recommends monitoring in production as well as profiling during development, using tools such as Flipper, React DevTools, and React Native Bundle Visualizer. Bruchim describes reporting startup measurements by device, platform, and app version, and checking pull requests for regressions. He also recommends Why Did You Render to identify avoidable renders and removing console logs from production.

Takeaways

  • Measure startup and interaction performance on the devices your users actually have.
  • Inspect the bundle and defer modules or localization data that are not needed at startup.
  • Cache useful data and images, and show available content while network updates run.
  • Profile rendering and use native-driven animations where their supported properties fit.
  • Track performance by device and release, and catch regressions during pull requests.

Mentioned in this talk

Search inside this talk

What was claimed 12

  • role at
    Omri Bruchim is leading the mobile platform at Twix
    “I’m currently leading the mobile platform at Twix.”
    YouTube
    Unverified1 source· Talk
  • metric
    Hermes Agent: Up to 50% startup improvement on specific devices in the speaker's reported case
    “we saw a startup improvement of up to 50% on specific devices.”
    YouTube
    Unverified1 source· Talk
  • uses
    “In our case at Wix, we saw a startup improvement of up to 50% on specific devices.”
    YouTube
    Unverified1 source· Talk
  • feature
    Hermes Agent: Does not support the Intl API and was missing some ES7 features at the time of the talk
    “it doesn't support the Intl API yet, and it's missing some ES7 features.”
    YouTube
    Unverified1 source· Talk
  • feature
    RAM bundles: Load individual app modules on demand
    “load into memory only what you need.”
    YouTube
    Unverified1 source· Talk
  • metric
    inline requires: Improved startup by 20% on iOS in the speaker's reported case
    “In our case, it improved startup by 20% on iOS.”
    YouTube
    Unverified1 source· Talk
  • built
    open-source library
    “an open-source library by Wix”
    YouTube
    Unverified1 source· Talk
  • feature
    JSI: Allows JavaScript and native code to communicate directly without serializing JSON messages over the bridge
    “JavaScript and native can finally talk to each other directly.”
    YouTube
    Unverified1 source· Talk
Show all 12 facts

Related talks