aspect-build / aspect-build/rules_js
[Bug]: Memory footprint increase to `js_image_layer` since rewritten.
- Dominant language
- Starlark
- Stars
- 378
- Forks
- 183
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 32
Description
### What happened?
Memory footprint got increased a lot in `js_image_layer` since last rewritten.
We are using remote execution, and the agent has 1 core & 3 Gb memory. It works fine in 2.1.2 but got OOM in 2.8.3
After some investigation, I guess that's caused by the recent rewritten.
In the past, it's using `tar-stream` which write the content to the dist progressively, which doesn't requires much memory space.
However, after rewritten, it seems to aggregate everything in the memory, and write to the disk at the end. This will increase the memory usage if `node_modules` contains lots of files.
### Version
Development (host) and target OS/architectures:
Output of `bazel --version`: bazel 8.5.0
Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file: 2.8.3
Language(s) and/or frameworks involved: nodejs
### How to reproduce
```shell
```
### Any other information?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.