-
Notifications
You must be signed in to change notification settings - Fork 99
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
Archiving IOS build is taking a lot of time after enabling hermes and MetroSerializer #2424
Comments
Hi @amanmoar277, I wonder if this is also related to #2416 and #2419. Can you try adding |
Hello, However, I didn't find a clean way to do this. 😕 |
What you also can try to do is setting const { makeMetroConfig } = require("@rnx-kit/metro-config");
const { MetroSerializer, esbuildTransformerConfig } = require("@rnx-kit/metro-serializer-esbuild");
module.exports = makeMetroConfig({
serializer: {
customSerializer: MetroSerializer([], {
minify: true,
minifyWhitespace: false,
minifyIdentifiers: true,
minifySyntax: true,
}),
},
transformer: esbuildTransformerConfig,
}); Documentation: https://github.com/microsoft/rnx-kit/tree/main/packages/metro-serializer-esbuild#minifywhitespace |
For fix and workaround, see #2416 (comment). |
Summary: Limit diagnostics width output by `hermesc` as they may cause slowdowns or even crashes in Gradle/Xcode when a minified bundle is used as input. This occurs because Hermes is unable to determine the terminal width when executed by Gradle/Xcode, and falls back to "unlimited". If the input is a minified bundle, Hermes will output the whole bundle for each warning. See issues filed: - microsoft/rnx-kit#2416 - microsoft/rnx-kit#2419 - microsoft/rnx-kit#2424 ## Changelog: [GENERAL] [FIXED] - Limit diagnostics width output by `hermesc` Pull Request resolved: #37531 Test Plan: See listed issues for repros. Reviewed By: cipolleschi Differential Revision: D46102686 Pulled By: cortinico fbshipit-source-id: 1b821cad7ef0d561a5e1c13a7aedf9b10164620a
Summary: Limit diagnostics width output by `hermesc` as they may cause slowdowns or even crashes in Gradle/Xcode when a minified bundle is used as input. This occurs because Hermes is unable to determine the terminal width when executed by Gradle/Xcode, and falls back to "unlimited". If the input is a minified bundle, Hermes will output the whole bundle for each warning. See issues filed: - microsoft/rnx-kit#2416 - microsoft/rnx-kit#2419 - microsoft/rnx-kit#2424 ## Changelog: [GENERAL] [FIXED] - Limit diagnostics width output by `hermesc` Pull Request resolved: #37531 Test Plan: See listed issues for repros. Reviewed By: cipolleschi Differential Revision: D46102686 Pulled By: cortinico fbshipit-source-id: 1b821cad7ef0d561a5e1c13a7aedf9b10164620a
What happened?
I am trying to archive the IOS build with hermes enabled, but it is taking a lot of time i.e. (~15-20x) times the time taken to build when hermes is disabled. I have tried this on multiple RN versions like 0.68.0, 0.71.8.
Even a simple RN app is taking almost 1 hour 15 minutes to archive the IOS build with hermes enabled and using esbuild bundler.
I am able to archive the build properly (i.e. without any effect on build time) in the following scenarios -
a. @rnx-kit/babel-preset-metro-react-native
b. @rnx-kit/metro-config
c. @rnx-kit/metro-serializer-esbuild
The esbuild is able to generate the JS bundle successfully in every scenario but the following step is causing issue.
Showing Recent Issues
Here is the metro and babel config which I am using.
package.json
I can't figure out why this is happening. Please let me know if I am missing some config here.
Affected Package
@rnx-kit/metro-serializer-esbuild, @rnx-kit/metro-config, @rnx-kit/babel-preset-metro-react-native
Version
0.1.23, 1.3.6, 1.1.4
Which platforms are you seeing this issue on?
System Information
Steps to Reproduce
Code of Conduct
The text was updated successfully, but these errors were encountered: