Giter VIP home page Giter VIP logo

Comments (14)

markmssd avatar markmssd commented on July 25, 2024 1

@h-a-n-a I was able to reproduce using the 10000 benchmark case, which I've extracted on its own.

Here is the repro link: https://github.com/markmssd/rspack-hmr-performance-regression.

To run it:

git clone https://github.com/markmssd/rspack-hmr-performance-regression
cd rspack-hmr-performance-regression && npm install

// now you have v0.7.1 installed

npm start

// edit any file multiple times
// on my Macbook M1, I see HMR times of ~250ms

// now edit `package.json` to install RSPack 0.7.0 and re-run npm install, and repeat
// with 0.7.0, I see refresh times of ~180ms

Results using RSPack 0.7.0:
0 7 0

Results using RSPack 0.7.1:
0 7 1

The difference in time is not as big as in our big monorepo, but it still demonstrates the regression consistently. Let me know if you need anything more!

from rspack.

github-actions avatar github-actions commented on July 25, 2024

Hello @pushkargupta9807, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

from rspack.

pushkargupta9807 avatar pushkargupta9807 commented on July 25, 2024

Please try with any application you may have to check the recompile times. Are there any performance dashboards?
Can we please have someone atleast triage this issue, maybe it is already known issue. Thanks

from rspack.

pushkargupta9807 avatar pushkargupta9807 commented on July 25, 2024

This is a serious perf degradation issue , and it should affect all the teams who track their inner-loop dev productivity OKRs .

from rspack.

h-a-n-a avatar h-a-n-a commented on July 25, 2024

You can check out the latest benchmark here https://web-infra-dev.github.io/rspack-ecosystem-benchmark/ . A reproduction would be helpful to tackle down your issue.

from rspack.

markmssd avatar markmssd commented on July 25, 2024

I've also noticed the slow down in HMR. It's not apparent in a small repo which updates in a few milliseconds, but in a larger one, it was taking ~800ms with 0.7.0, and ~1.5s with 0.7.1. @pushkargupta9807 do you think you can put together a repro for this?

from rspack.

pushkargupta9807 avatar pushkargupta9807 commented on July 25, 2024

@h-a-n-a @markmssd I have been trying with the repro repo I have, but it is very small and the regression is not quite apparent there.
Having said that, will it help if I collect and share cpu profile for it ?

Also the panic reported in #6742 is becoming more frequent :

Message: index out of bounds: the len is 272 but the index is 280
Location: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-2.2.6/src/map/core.rs:45

Is the above index out of bounds reported by others as well?

from rspack.

pushkargupta9807 avatar pushkargupta9807 commented on July 25, 2024

@h-a-n-a in benchmark dashboard how do I see and interpret recompile performance?

from rspack.

markmssd avatar markmssd commented on July 25, 2024

We can try forking their benchmark repo: https://github.com/web-infra-dev/rspack-ecosystem-benchmark, and then in one branch we install v0.7.0, and in another v0.7.1, and compare the HMR times. I hope that'll work.

Edit: might be easier with https://github.com/web-infra-dev/bundler-benchmark maybe? Not sure what's the difference

from rspack.

pushkargupta9807 avatar pushkargupta9807 commented on July 25, 2024

Thank you @markmssd for the repo. I am also seeing the same factor of regression in my repo which is huge.
Before with 0.7.0 : recompile time : 5.8s
Now with 0.7.1: recompile time: 8.8s.

Also in your main repo , when you are editing and saving a file multiple times - do you occasionally run into panics like below with 0.7.1?

Message: index out of bounds: the len is 272 but the index is 280
Location: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/indexmap-2.2.6/src/map/core.rs:45

from rspack.

markmssd avatar markmssd commented on July 25, 2024

I just tried and I couldn't reproduce your error no, sorry. I am using RSPack 0.7.2-canary-fdfff21-20240606140946 which fixes #6740, so maybe give that one a try?

from rspack.

h-a-n-a avatar h-a-n-a commented on July 25, 2024

Turned out it's more likely related to caching.

In v0.7.0:
image

In v0.7.1:
image

Would you please confirm @jerrykingxyz ?

from rspack.

markmssd avatar markmssd commented on July 25, 2024

Thanks @jerrykingxyz @h-a-n-a! 🚀

from rspack.

pushkargupta9807 avatar pushkargupta9807 commented on July 25, 2024

Thank you @markmssd , @jerrykingxyz, @h-a-n-a !

  1. Can you please let me know how can I pick up above changes - I can test it out in our large repo and provide feedback.
  2. @h-a-n-a can you please lay the exact steps you did to collect and profile the recompile flow as above? I use the a different tool - but your profile looks pretty informative and easy to understand.

from rspack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.