-
Couldn't load subscription status.
- Fork 373
Closed as not planned
Description
What is the issue with the Fetch Standard?
Memory leak in Fetch with large stream responses
Description
When processing large responses as ReadableStreams, some implementations fail to properly garbage collect stream resources, leading to memory leaks.
Steps to Reproduce
- Fetch a large resource (100MB+) as a stream
- Cancel the stream before complete consumption
- Repeat multiple times
- Observe memory usage growth
Expected Behavior
Memory should be properly reclaimed when streams are cancelled or consumed.
Actual Behavior
Memory usage grows with each stream cancellation and is not reclaimed.
Browser Affected
- Chrome: ✅ No leak detected
- Firefox: ❌ Memory grows with each cancelled stream
- Safari:
⚠️ Minor memory accumulation
Specification Reference
https://fetch.spec.whatwg.org/#body-mixin
Severity
Medium - Affects long-running web applications with frequent large data transfers.
Metadata
Metadata
Assignees
Labels
No labels