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
Slow bundle download(~2 mins) in dev mode by ReloadCommand(r) on iOS after RN 72 upgrade #1243
Comments
|
|
Issue still persists when updated to 0.72.12. |
Tried this, still the same issue. Let me know any relevant files/code/functions which can be investigated. |
@jayshah123 you could try react-native-bundle-visualizer |
Bundle size does not seem to be a problem, due to following observation:
On the other hand, There seems to be no difference on the server sides for both cases - returns instantly from metro server ~1s in the finish section of requestprocessor. The only difference I notice between good vs bad case is lots of slow reads on
Maintainers, what is a good place/way to start investigating the root cause? |
Description
I have a large bundle.
After recent upgrade to
RN 0.72.12
, metro version -metro@0.76.9
, I see large download times for already traversed bundle, when using reload command "r"The first load, bundle does not need downloading.
But for every reload command("r" press on iOS),
the bundle download to simulator (for the already traversed bundle) takes about 2 mins.
I did some analysis on size of the bundle transferred by Metro Server is ~248 MB. I am working to reduce bundle size, but due to lack of tree-shaking, the current size is about ~248 MB. In the absensece of tree shaking, what tools are recommended for bundle size analysis?
The size was measured by the value of following code in
Server.js
in metro source code.For the same project, if I try to download using curl, it takes about 7s to download to a file, for an already traversed bundle, which was measured via:
Steps to reproduce
React Native Version
0.72.12
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
private code/bundle.
Screenshots and Videos
Downloading 1..100% takes ~2 mins when ReloadCommand "r" is pressed.
The text was updated successfully, but these errors were encountered: