Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[0.88] Compile React Native C/C++ at -O2 on iOS to match Android

Open
#1,457 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
android, c, cmake, cpp, git, ios, objective-c, react-native, swift

Research direction

Start by reviewing commit 60c817e9256abaea212ebd826d18043d4f1c5109 and the upstream change react/react-native#59226. Trace the Release optimization settings for React Native's iOS frameworks, CocoaPods source builds, Yoga, glog, and the SwiftPM codegen package. Done means the 0.88 branch applies the stated -O2 settings across those build paths while leaving the listed unaffected code unchanged.

Written by the indexing model from the issue text.

Description

Type Pick Request
Target Branch

0.88

Link to commit or PR to be picked

https://github.com/react/react-native/commit/60c817e9256abaea212ebd826d18043d4f1c5109

Description

Picks react/react-native#59226 (merged to main as 60c817e) for 0.88.1.

On iOS, React Native's C, C++ and Objective-C code is compiled with -Os in Release (Xcode's default), while Android uses -O2. This change sets GCC_OPTIMIZATION_LEVEL = 2 for Release builds of React Native's own code on iOS, and builds Yoga and glog at -O2 in all configurations, matching Android. It covers the prebuilt React.xcframework and ReactNativeDependencies.xcframework, CocoaPods builds from source, and the SwiftPM codegen package. Hermes, Swift code, community library pods and app pods are not affected.

Impact: In a layout benchmark, Yoga layout takes 21–54% less time in Release and about 94% less time in Debug. The community has reported measurable app-level gains (https://github.com/bluesky-social/social-app/pull/12061). Apps cannot apply this themselves when they use the prebuilt React Native frameworks, so it needs to ship in a React Native release.

Trade-off: The stripped React.framework binary grows by about 6.2%. Apps that want the old behaviour can set GCC_OPTIMIZATION_LEVEL back to s in their post_install, after react_native_post_install.

Dominant language
No language data
Stars
429
Forks
11
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from reactwg/react-native-releases

All issues in reactwg/react-native-releases

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.