fix: Isolate and cache process.report.getReport() calls in a child process for robust environment detection#6251
Conversation
|
@alan-agius4 is attempting to deploy a commit to the rollup-js Team on Vercel. A member of the Team first needs to authorize it. |
b8832ff to
45066c7
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6251 +/- ##
==========================================
- Coverage 98.83% 98.76% -0.07%
==========================================
Files 273 273
Lines 10700 10712 +12
Branches 2854 2854
==========================================
+ Hits 10575 10580 +5
- Misses 82 89 +7
Partials 43 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Nice catch. In my experience, though, spawning child processes has quite some performance overhead, which will negatively affect startup time. Maybe we can limit this to windows environments, where the issue was observed, and use the regular call on Linux? |
SGTM |
6b87b74 to
500e390
Compare
…process for robust environment detection. This refactoring isolates the `process.report.getReport()` call into a separate child process. This change is necessary because since the introduction of this code, we have observed frequent process crashes on Windows, specifically with the error code -1073740940 (0xC0000374), which corresponds to a Windows heap corruption error. By moving the report generation to an isolated process, any potential instability or memory corruption is contained and does not affect the main process. The retrieved report header is cached to ensure that the child process is spawned only once, making this a fast and efficient solution for environment detection.
500e390 to
f96f336
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
This PR has been released as part of rollup@4.57.1. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Not in this repo.
For some details angular/angular-cli#32234
Description
This refactoring isolates the
process.report.getReport()call into a separate child process. This change is necessary because since the introduction of this code, we have observed frequent process crashes on Windows, specifically with the error code -1073740940 (0xC0000374), which corresponds to a Windows heap corruption error.By moving the report generation to an isolated process, any potential instability or memory corruption is contained and does not affect the main process.
The retrieved report header is cached to ensure that the child process is spawned only once, making this a fast and efficient solution for environment detection.