Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Build profiling

Jamie Birch
February 18, 2025

Build profiling

I presented this talk on build profiling at React Native Meetup #20 (featuring Meta and Callstack) on Feb 18th 2025 in Japanese. This is the English version.

Jamie Birch

February 18, 2025

Transcript

8 slides
  1. Contents I'll introduce a couple of debug-mode cold build profiles

    for both iOS and Android. We'll see what we can learn from each of them in turn.
  2. React-Native core expo-modules-core Expo Modules native modules
 ʢe.g. react-native-webviewʣ React-RCTFabric

    Fabric modules? Codegen React-Fabric Libraries without dependencies ʢe.g. yogaʣ
  3. Totalɿ1m 55s :*:buildCMakeDebug Each architectureʢarm64-v8aɺarmeabi-v7aɺx86ɺx86_64ʣgets built serially in turn. app:

    7.8 + 8.1 + 6.2 + 7.9 = 30ඵ expo-modules-core: 5.2 + 4.7 + 5.2 + 4.4 = 20ඵ react-native-quick-sqlite: 9.2 + 9.2 + 8.8 + 9.6 = 37ඵ react-native-screens: 1.5 + 1.4 + 1.4 + 1.4 = 6ඵ :react-native-quick-sqlite:buildCMakeDebug :expo-modules-core:buildCMakeDebug :app:buildCMakeDebug ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ :react-native-screens:buildCMakeDebug ˎˎ ˎˎ :*:compileDebugKotlin expo-modules-core: 🚧 23ඵ ɹ├ expo-asset: 1ඵ ɹ├ expo-constants: 1ඵ ɹ├ expo-file-system: 4ඵ ɹ├ expo-font: 1ඵ ɹ├ expo-keep-awake: 1ඵ ɹ└ expo-splash-screen: 1ඵ react-native-screens: 14ඵ react-native-safe-area-context: 7ඵ react-native-webview: 7ඵ ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ ˎ 🚧
  4. Conclusion • Builds have both parallel and serial stages. •

    As much as possible, we want to build in parallel. • Of course, prebuilt modules would be ideal. • The React Native iOS core will be improved in future. • Someone should really look into buildCMakeDebug's settings!

More Decks by Jamie Birch

Other Decks in Technology