cloudflare / cloudflare/worker-speedtest-template

why dont you use a stream to generate file?

Open
#16 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
218
Forks
32
PR merge metrics
No merged PRs in 30d

Description

I build a service which can generate arbitrary size file on Cloudflare Workers using stream.

https://github.com/alsotang/cf_workers__file

I wanna copy your implement at first, but it seems you alloc a corresponding size of memory to hold the file. Your implement would reach the worker's memory limit if the file size is big.

Contributor guide

Open the contributing guide

Research direction

Start by locating the current file-generation entry point in this repository, then compare its behavior with the stream-based example at https://github.com/alsotang/cf_workers__file. Determine whether large generated files can be produced without allocating the full size in memory. Done means the implementation avoids exceeding Cloudflare Workers memory limits for large files and existing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, cloud
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.