Comments (14)
@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
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.
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.
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.
This is a serious perf degradation issue , and it should affect all the teams who track their inner-loop dev productivity OKRs .
from rspack.
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.
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.
@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.
@h-a-n-a in benchmark dashboard how do I see and interpret recompile performance?
from rspack.
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.
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.
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.
Turned out it's more likely related to caching.
Would you please confirm @jerrykingxyz ?
from rspack.
Thanks @jerrykingxyz @h-a-n-a! 🚀
from rspack.
Thank you @markmssd , @jerrykingxyz, @h-a-n-a !
- 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.
- @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)
- [Bug]: `fork-ts-checker-webpack-plugin` intermittently and frequently breaks when building / using dev-server HOT 2
- [Bug]: compatibility plugin not works well
- [Bug]: Panic when `concatenateModules` and `CssExtractRspackPlugin` used HOT 3
- [Bug]: reexport will have duplicate key in object
- test: add more test cases for runtime ids and condition expression
- Dev Server errors on code changes: StringExpected, Failed to convert JavaScript value `Undefined` into rust type `String` HOT 1
- [Bug]: SVG external references unofficially work with hacks HOT 1
- [Bug]: Reopen https://github.com/web-infra-dev/rspack/issues/6714 HOT 2
- [Bug]: web worker error in host HOT 1
- [Bug]: incorrect LICENSE.txt HOT 1
- [Bug]: Global polyfill no longer seems to work HOT 2
- [Bug]: Vue2, code-inspector-plugin, yield "Calling promisify on a function that returns a Promise is likely a mistake"
- [Bug]: rspack转化ts结果不符合预期,typeof语句被转为0 HOT 3
- docs: add api description of externalsPlugin
- [Bug]: ProgressPlugin: time is NaN HOT 1
- [Bug]: The development mode is normal, and the packaging is reported to report an error HOT 4
- [Bug]: (1.0.0-alpha)Js API rspack build out info no have gzip info
- [Bug]: bad case of unused pure expression HOT 1
- [Bug]: Rsbuild: HarmonyLinkingError: export 'Layout' (imported as 'Layout') was not found in '@rive-app/react-canvas' (possible exports: __esModule, default, useRive, useStateMachineInput) HOT 5
- [Feature]: support freebsd HOT 1
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 rspack.