Help Needed: React Native Project Build Time Optimisation

Hello Everyone :hugs:,

I’m contacting you in order to get some guidance and best practices about Bitrise build time optimisation for React Native projects. Although our staff continues to be using Bitrise for some time and is generally happy with the platform, we have had some issues with the effectiveness of our builds.

Here is a quick rundown of our present configuration:

Project Type: Managed Workflow for React Native

Bitrise Procedures:

  • Git Clone Storage
  • Put NPM packages in place.
  • Put Pods in Place
  • Execute tests (end-to-end tests with Detox, unit tests with Jest).
  • Constructed for both iOS and Android
  • Install in the appropriate stores
  • Hardware Standard Bitrise construction machines are what we’re utilising.

Our biggest concern is that the build process can take more than thirty minutes at times, particularly if the project has a lot of dependencies or updates. Although caching node_modules and containers has been tried and has somewhat assisted, the improvements are still small.

Specifically, I need guidance on the following:

Caching Strategies: In React Native projects, what are the optimal caching practices? :thinking: Have you found any particular methods or procedures that have drastically shortened your build times? :thinking:

Step Optimisation: For React Native projects, are there any Bitrise steps or combinations that are proven to be more effective? :thinking:

Parallelization: In order to expedite the build process overall, how can we in Bitrise efficiently parallelize specific tasks? :thinking:

Community Advice: Are there any other pointers or strategies that the community may share that have worked well to shorten build times? :thinking:

I also checked this :point_right: https://reactnative.dev/aws/docs/build-speed

Any advice or ideas you have would be greatly appreciated. I’m interested in hearing about your insights and recommendations.

Hi @joynick - I can chime in on parallelisation: Bitrise has a feature pipelines called pipelines which allows you to parallelise your CI tasks. This is a good starting point to understand the feature. And here is the relevant chapter in the DevCenter

Note: we are making considerable improvements to the pipeline feature at the moment including introducing a means to configure them via the Workflow Editor UI. Watch out for future announcements!

I’ll let other members of the community answer your other questions.