The suggested .cjs resolver fix on 3.5.4 adds 10 seconds of boot on iOS. #9437
Labels
🏓 awaiting-contributor-response
requires input from a contributor
🛬 fixed-in-prerelease
🐎 performance
⚛️ React-related
Milestone
Intended outcome:
Update Apollo client 3.3.11 -> 3.5.8 on a react-native app.
Actual outcome:
After doing it (including the .cjs resolver fix) our react-native app boot went from 1 second to 10. For the record, it felt like the whole JS code was slow but around 8 seconds was into AWS Cognito Auth.signIn. The problem occurred only on the iOS device and was not present on the simulator.
I've track down the problem to the .cjs resolver change proposed here. When I rollback everything (clean-rebuild) with this, I get the ugly 10 seconds boot.
How to reproduce the issue:
I understand I don't have a clean isolated repro but this thing was hard to find, mostly because it's device specific. There are lot of slow boot problems around react-native so my hope is to help someone else and maybe it will lead to more info on the problem.
Versions
with .cjs resolver fix -> slow boot
without -> just fine
System:
OS: macOS 11.3.1
Binaries:
Node: 16.14.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.3.1 - /usr/local/bin/npm
Browsers:
Chrome: 98.0.4758.102
Safari: 14.1
npmPackages:
@apollo/client: ^3.3.11 => 3.3.11
The text was updated successfully, but these errors were encountered: