Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split Hermes build for iOS on different executors to speed up CI and Releases #38619

Closed
wants to merge 1 commit into from

Conversation

cipolleschi
Copy link
Contributor

@cipolleschi cipolleschi commented Jul 25, 2023

Summary:

This PR splits the build of Hermes for iOS in multiple jobs.

Before, we were building all the slices of Hermes serially. So, we were:

  • building the hermesc
  • building hermes for iPhone
  • building hermes for iPhonesimulator
  • building hermes for Macos
  • building hermes for Catalyst
  • packaging the framework
    This job was taking up to 45-50 minutes.

The the four slices (iPhone, iPhonesimulator, Macos, Catalyst) can be parallelized to harvest a speedup in execution.
The following tables contains the executions before and after this change.

  • Full Clean Build -> Before: 51' 35" | After: 17'33" ( 3x improvement)
BEFORE AFTER
Screenshot 2023-07-28 at 11 48 24 Screenshot 2023-07-28 at 11 16 32
Total time (critical path): build_hermes_macos-Debug = 51' 35" Total time (critical path): build_hermesc_apple (2' 56") + build_apple_slices_hermes-Debug-macosx (9'23") + build_hermes_macos-Debug (5'14") = 17'33"
  • Fully Cached Build -> Before: 4'35" | After: 32" ( 9x improvement)
BEFORE AFTER
Screenshot 2023-07-28 at 14 38 12 Screenshot 2023-07-28 at 16 12 17
Total Time (critical path): build_hermes_macos-Debug (4'35") Total Time (critical path): build_hermesc_apple (7") + build_apple_slices_hermes-Debug-macosx (7") + build_hermes_macos-Debug (32") = 46"

Changelog:

[Internal] - Split hermes build to speedup CI and Release

Test Plan:

  • CircleCI stays green
  • Hermes artifact still works for RNTester and app from the template

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 25, 2023
@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch 8 times, most recently from 08c6bae to 2b6ab59 Compare July 25, 2023 14:07
@analysis-bot
Copy link

analysis-bot commented Jul 25, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,894,300 -1
android hermes armeabi-v7a 7,942,876 +4
android hermes x86 9,292,201 -1
android hermes x86_64 9,193,733 -3
android jsc arm64-v8a 9,480,955 -1
android jsc armeabi-v7a 8,422,520 -1
android jsc x86 9,464,982 -3
android jsc x86_64 9,779,239 -2

Base commit: 1f24750
Branch: main

@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch 18 times, most recently from dbd4c0b to 9b14a49 Compare July 26, 2023 13:41
@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch 9 times, most recently from ad75204 to 3135b69 Compare July 29, 2023 09:17
@cipolleschi cipolleschi marked this pull request as ready for review July 29, 2023 14:25
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch 2 times, most recently from 85a6b2a to d7c80bb Compare July 31, 2023 09:39
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch from d7c80bb to b57fb18 Compare August 2, 2023 14:34
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch from b57fb18 to 94843e8 Compare August 2, 2023 14:39
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch from 94843e8 to ea2da1a Compare August 2, 2023 14:40
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cipolleschi
Copy link
Contributor Author

/rebase

@cipolleschi cipolleschi force-pushed the cipolleschi/split_hermes_build_ios branch from ea2da1a to e24905c Compare August 2, 2023 15:20
@facebook-github-bot
Copy link
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

This pull request was successfully merged by @cipolleschi in 79122ab.

When will my fix make it into a release? | Upcoming Releases

@github-actions github-actions bot added the Merged This PR has been merged. label Aug 2, 2023
@cortinico cortinico deleted the cipolleschi/split_hermes_build_ios branch June 10, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants