rsbuild
rsbuild copied to clipboard
[Bug]: HMR Memory leak when saving rsbuild.config.ts multiple times
Version
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
Memory: 27.91 GB / 39.39 GB
Browsers:
Edge: Chromium (123.0.2420.97)
Internet Explorer: 11.0.19041.3636
npmPackages:
@rsbuild/core: 0.6.13 => 0.6.13
@rsbuild/plugin-eslint: 0.6.13 => 0.6.13
@rsbuild/plugin-react: 0.6.13 => 0.6.13
@rsbuild/plugin-type-check: 0.6.13 => 0.6.13
Details
Running dev server and changing the rsbuild.config.ts
causes the memory to jump up 2-4gb at a time, eventually reaching the machine's maximum memory limit and slowing down HMR from 10 seconds to 1+ minutes. Attached a video to show this happening.
Reproduce link
Video attached
Reproduce Steps
- rsbuild dev
- Change
rsbuild.config.ts
multiple times - Notice that memory for the rsbuild process is jumping up too much and reaching maximum after 5-10 file changes saved.
https://github.com/web-infra-dev/rsbuild/assets/157121643/bf6c7bad-3b66-4e91-b0f2-d0415a36c6d6
Thanks for the report, we will try to reproduce and fix this.
I can't confirm whether this problem is in both mac or win. On my mac, config reload is more obvious than hmr memory.
But there is no jump such as a one-time increase of 2-4GB.
Rsbuild v0.7.10 仅打开Webstorm运行一个前端项目 开发环境构建失败后再次使用npm工具重新构建,多次之后Node内存占用就10-20GB了,占用内存主要是运行的Rsbuild项目
This problem cannot be reproduced in my machine. Can you provide a minimum reproduction? Excluding the impact of webstorm or vscode, you can reproduce it on vscode.
The same happens on my machine too, windows
The same happens on my machine too, windows
hey, can you confirm that this happened after https://github.com/web-infra-dev/rsbuild/pull/3261 (1.0.1-beta.16)?
The same happens on my machine too, windows
hey, can you confirm that this happened after #3261 (1.0.1-beta.16)?
I am currently at @rsbuild/core 1.0.17
Also, a discovery, removing watchFiles reduces the intensity of the memory leak