Comments (4)
Hi @asherLZR - thanks for the report. The specific detail of a regression between those versions (and how clear your numbers make that) is new information for me, so I'm happy to investigate this as a separate issue until we've pinned down the point of regression. Indeed the fact that the regression is similar with and without cache suggests a main thread issue, and most of that is (or should be) module resolution.
We didn't knowingly regress while introducing symlink support (in fact we were pretty careful trying not to) but obviously something has slipped between those versions that we're not aware of.
I will investigate further and check next week to see if we can upgrade to the latest metro despite being currently tied to RN72 for now.
We don't normally recommend this (we don't guarantee new Metro supports older RN, especially around things like downlevelling for Hermes) but for the sake of experiment it can be done with eg Yarn resolutions, taking care around the breaking changes in Metro's release notes. For Metro 0.80 with RN 0.72 I'd recommend using the RN 0.73-style metro.config.js
, extending @react-native/[email protected]
. I think that should work.
In the mean time I'm going to try to reproduce something with an artificial project of a similar structure - if I can't do that I'd love your help bisecting this down to at least a particular Metro release, if you're willing, or if (NDA) access to your repo is possible I'd be happy to take a look. I feel like this is pretty important to get to the bottom of!
Update
There's a detectable resolution perf regression on acbfe63 between 0.74.1 and 0.75.0 - I'd be interested to know whether that reproduces on your repo. Investigating further...
from metro.
I would be happy to assist with the bisect of this for now and we can explore further options if need be. My test method so far has been to run once with --reset-cache
then 3 subsequent times without.
I've tried to keep things constant in the environment by not doing memory/cpu intensive tasks but there will be some uncertainty. Despite this, there is indisputable change between 0.75.0 and 0.76.8. Where possible, I will continue with narrowing down the versions this week.
- Baseline 0.73.9
- 0.74.1 no change relative to baseline
- 0.75.0 +23% relative to baseline
- 0.76.8 +80% relative to baseline
from metro.
Ouch, that looks like two regressions.
The first one (in 0.75.0) is due to an increase in path.resolve and path.relative calls, which are maybe-surprisingly expensive. We're working on a fix for that.
The second is new to me - that'll take some more bisection. Hopefully it's reproducible in the sample projects I have.
Thanks again for your help with this.
from metro.
Thanks for the helpful insight. I've managed to run a new set of tests. The good news is that between 0.76.2 and 0.80.6 there appears to be little regression (on par with 0.76.8 as described in the original post).
My results tell me that something introduced between 0.76.1 and 0.76.2 caused the further slow down of ~20%.
from metro.
Related Issues (20)
- Problem during ReactNative project deployment for iOS HOT 2
- Add types for `require.context` HOT 1
- Package Exports resolution differs from Node in 2 edge cases HOT 3
- Slow bundle download(~2 mins) in dev mode by ReloadCommand(r) on iOS after RN 72 upgrade HOT 6
- Uncaught TypeError: (0 , import_toolkit.createSlice) is not a function
- [Help Wanted] Need help with the blocklist option to exclude a folder from metro build
- Metro bundle not connecting with iOS simulator in Release and Debug mode
- Metro bundle not connecting to iOS simulator in Release and Debug mode HOT 5
- Metro has encountered an error HOT 3
- Validation Warning: Unknown option... This is probably a typing mistake. Fixing it will remove this message.
- error index.js: Cannot read properties of undefined (reading 'match')
- Load raw files as text and watch for changes
- Why is the "getModules" function only available in DEV mode? HOT 7
- "server.runInspectorProxy" warning after update to version "0.73.6" #233 HOT 3
- `require()` errors not propagated upwards to calling function HOT 2
- Metro Not Launching App on Physical iOS 17.4.1 Device
- Can not import modules with a non-literal specifier HOT 1
- [Feature Request] - Public env variables loading customization option
- How should I use dynamic import: import() in a monorepo with React Native version 0.74.0?
- Cannot find module node_modules/react-native/Libraries/Core/InitializeCore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metro.