Title: `Readable.toWeb` seems to load file contents to memory · Issue #46347 · nodejs/node · GitHub
Open Graph Title: `Readable.toWeb` seems to load file contents to memory · Issue #46347 · nodejs/node
X Title: `Readable.toWeb` seems to load file contents to memory · Issue #46347 · nodejs/node
Description: Version v19.5.0 Platform Darwin dzieni 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 arm64 Subsystem stream What steps will reproduce the bug? run REPL create a file stream: ...
Open Graph Description: Version v19.5.0 Platform Darwin dzieni 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 arm64 Subsystem stream What steps will reproduce ...
X Description: Version v19.5.0 Platform Darwin dzieni 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 arm64 Subsystem stream What steps will reproduce ...
Opengraph URL: https://github.com/nodejs/node/issues/46347
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`Readable.toWeb` seems to load file contents to memory","articleBody":"### Version\n\nv19.5.0\n\n### Platform\n\nDarwin dzieni 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 arm64\n\n### Subsystem\n\nstream\n\n### What steps will reproduce the bug?\n\n- run REPL\r\n- create a file stream: `const nodeStream = fs.createReadStream('/some/large/file')`\r\n- check `process.memoryUsage()`\r\n- convert it to a web stream: `const webStream = (require('stream').Readable).toWeb(nodeStream)`\r\n- check `process.memoryUsage()`\n\n### How often does it reproduce? Is there a required condition?\n\nAt all times\n\n### What is the expected behavior?\n\nMemory usage does not grow significantly.\n\n### What do you see instead?\n\nMemory usage (precisely `arrayBuffers` section) grows by a few orders of magnitude. It seems to be correlated with the file size.\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/Dzieni","@type":"Person","name":"Dzieni"},"datePublished":"2023-01-25T11:30:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":24},"url":"https://github.com/46347/node/issues/46347"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:355df519-10cd-fc41-9ab4-481b3e1899a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A2EA:1CB805:3A27BE:4F098A:6A4D9FEF |
| html-safe-nonce | c524b10bd5bcbd790bc877649e2e8b6f32441140550b90941d0a829b015b3584 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkVBOjFDQjgwNTozQTI3QkU6NEYwOThBOjZBNEQ5RkVGIiwidmlzaXRvcl9pZCI6IjEyMzQzNzc5MTkwOTYwMDQ1OTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 26070e92d069624a9c5ce30881aa089190e983012ebe1546bf61e034560c6795 |
| hovercard-subject-tag | issue:1556490952 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/46347/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6351577177b754dc96be9fc14623a1817efc4e8e83477ed4ba6a1720be0d6588/nodejs/node/issues/46347 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6351577177b754dc96be9fc14623a1817efc4e8e83477ed4ba6a1720be0d6588/nodejs/node/issues/46347 |
| og:image:alt | Version v19.5.0 Platform Darwin dzieni 21.6.0 Darwin Kernel Version 21.6.0: Wed Aug 10 14:28:35 PDT 2022; root:xnu-8020.141.5~2/RELEASE_ARM64_T8101 arm64 Subsystem stream What steps will reproduce ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Dzieni |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f13faa65cccc9b729d674da83335d5dcfdfd193 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width