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

chore(speed): use recommended arch flag for local android builds #11170

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brainbicycle
Copy link
Contributor

@brainbicycle brainbicycle commented Nov 21, 2024

This PR resolves []

Description

While looking at the perf docs I saw this consequential little flag: https://reactnative.dev/docs/0.75/build-speed

When building your android app locally, by default you build all the 4 [Application Binary Interfaces (ABIs)](https://developer.android.com/ndk/guides/abis) : armeabi-v7a, arm64-v8a, x86 & x86_64.

However, you probably don't need to build all of them if you're building locally and testing your emulator or on a physical device.

This should reduce your native build time by a ~75% factor.

This was a very unscientific test of two clean builds so maybe others can try and see how it goes but it seems significant 👀 🙏 :

### Try 1:
With the flag:
BUILD SUCCESSFUL in 39s

Without the flag:
BUILD SUCCESSFUL in 2m 28s

### Try 2:
With the flag: 
BUILD SUCCESSFUL in 40s

Without the flag:
BUILD SUCCESSFUL in 2m 39s

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

  • only build android dev builds on active arch to speed up - brian

Need help with something? Have a look at our docs, or get in touch with us.

@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Dev changes (only build android dev builds on active arch to speed up - brian - brainbicycle)

Generated by 🚫 dangerJS against 16ececf

@brainbicycle brainbicycle changed the title chore(speed): use recommended arch flag chore(speed): use recommended arch flag for android builds Nov 21, 2024
@brainbicycle brainbicycle changed the title chore(speed): use recommended arch flag for android builds chore(speed): use recommended arch flag for local android builds Nov 21, 2024
Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an impressive gain!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants