meteor / meteor

Meteor, the JavaScript App Platform
https://meteor.com
Other
44.45k stars 5.2k forks source link

HMR Slowness with Meteor 3.0.3 + React + MUI6 #13430

Closed bratelefant closed 1 week ago

bratelefant commented 1 month ago

Issue Summary:
Hot Module Replacement (HMR) in Meteor 3.0.3 has significant delays compared to version 2.16. With 2.16, HMR updates are almost instant (<1 second), but with 3.0.3, these updates take approximately 7 seconds. Profiling using METEOR_PROFILE=20 meteor run shows similar build times, but it takes significantly more time between the step "prepareProjectForBuild" and "Profiling: Rebuild App".

Steps to Reproduce:

  1. Clone my fork of @Ritinha999's repo: https://github.com/bratelefant/simple-app
  2. Run the app using meteor run.
  3. Make a minor change, such as adding a character in Dummy.jsx, and observe the HMR response time. This is as quick as it should be (it's on 2.16)
  4. Run meteor update to update to any 3.0 version
  5. Repeat steps 2.+3. Now changes take ~7 seconds to be visible in the browser.

Observed Results:

Environment:

Additional Notes:

9Morello commented 1 week ago

Does that slowness persists if you run the project with the Meteor 3.1.0 RC0? I'm getting pretty fast hot reload with the Release Candidate build.

nachocodoner commented 1 week ago

In this PR we already identified the issues with HMR and fix them, https://github.com/meteor/meteor/pull/13448.

As in the comment above, as part of Meteor 3.1.0-RC0 we included that fix.

To try it and confirm please do:

meteor update --release 3.1-rc.0
nachocodoner commented 1 week ago

Official Meteor 3.1 has been released, including the fix on HMR and build slowness on Meteor 3.

Update your app and share any feedback.

meteor update --release 3.1