troZee / fabric-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RN New Arch Performance Benchmarks

This repo aims to provide different scenarios to benchmark performance difference between the new RN architecture and the old one.

Scenario 1: Just display 10k views

Run performance test

  1. In one terminal, run npx appium
  2. In another run NEW_ARCH=false npx ts-node performance/manyviews.ts
  3. Then run NEW_ARCH=true npx ts-node performance/manyviews.ts
  4. Compare results with npx @perf-profiler/web-reporter results_*

More details on https://github.com/bamlab/android-performance-profiler

Scenario 2: Just display 1k texts

Install APKs

adb install apks/fabric-many-texts.apk
adb install apks/nofabric-many-texts.apk

Run performance test

  1. In one terminal, run npx appium
  2. In another run NEW_ARCH=false npx ts-node performance/manyviews.ts
  3. Then run NEW_ARCH=true npx ts-node performance/manyviews.ts
  4. Compare results with npx @perf-profiler/web-reporter results_*

More details on https://github.com/bamlab/android-performance-profiler

Scenario 3: Just display 100 tweets

Install APKs

adb install apks/fabric-100-tweets.apk
adb install apks/nofabric-100-tweets.apk

Run performance test

  1. In one terminal, run npx appium
  2. In another run NEW_ARCH=false npx ts-node performance/tweets.ts
  3. Then run NEW_ARCH=true npx ts-node performance/tweets.ts
  4. Compare results with npx @perf-profiler/web-reporter results_*

More details on https://github.com/bamlab/android-performance-profiler

Scenario 4: Just display 2k SVGs

Run performance test

  1. In one terminal, run npx appium
  2. In another run NEW_ARCH=false npx ts-node performance/svg.ts
  3. Then run NEW_ARCH=true npx ts-node performance/svg.ts
  4. Compare results with npx @perf-profiler/web-reporter results_*

More details on https://github.com/bamlab/android-performance-profiler

Scenario 5: Pokedex Flatlist

Install APKs

adb install apks/fabric-flatlist.apk
adb install apks/nofabric-flatlist.apk

Scenario 6: Navigation

Install APKs

adb install apks/navigation-fabric.apk
adb install apks/navigation-nofabric.apk

Run performance test

  1. In one terminal, run npx appium
  2. In another run NEW_ARCH=false npx ts-node performance/navigation.ts
  3. Then run NEW_ARCH=true npx ts-node performance/navigation.ts
  4. Compare results with npx @perf-profiler/web-reporter results_*

More details on https://github.com/bamlab/android-performance-profiler

Build APKs

  1. Change scenario import in FabricEnabled/index.js
  • At the moment, if using navigation scenario, you also need to git checkout navigation
  1. Copy code to FabricDisabled
# Copy code
cp -R FabricEnabled/index.js FabricDisabled
cp -R FabricEnabled/scenarios FabricDisabled
  1. Make release builds
# Run builds
cd FabricEnabled/android && ./gradlew assembleRelease
cd FabricDisabled/android && ./gradlew assembleRelease

About


Languages

Language:TypeScript 35.1%Language:Java 26.9%Language:C++ 12.4%Language:Objective-C++ 7.6%Language:HTML 7.0%Language:Objective-C 4.1%Language:Ruby 2.8%Language:JavaScript 1.9%Language:Starlark 1.0%Language:Shell 0.8%Language:CMake 0.5%