Recreated benchmarks from this tweet on X to compare:
- RN built-in fetch
- Expo fetch
- react-native-nitro-fetch
All benchmakrs are defined in benchmarks/index.ts.
- JSON payload: Used 50MB json from this page. It should be placed in the
fixtures/directory. - Localhost hosted to mitigate networking impact (some libraries do proecessing during the
await fetch()call instead ofawait response.<<desiredFormat>>()so networking time could not be fully separated.)_- Used
cd fixtures && python3 -m http.server(orbun run serve) for simulator/Localhost. - Used PocketServer app on physical iOS.
- The app is also available on Android.
- Used
Some random results are available in the screenshots directory.
In the patches there are two patches:
expo- added zero-copyarrayBuffer2()to compare memory copying costexpo-modules-core- (needed for the above) implementations for native ArrayBuffers that have not been released yet.
This is an Expo project created with create-expo-app. App UI was vibe-coded.
