vercel-labs / vercel-labs/scriptc
256 KiB fiber stack allocated for every async function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.9k
- Forks
- 125
- Avg merge
- 2h 14m
- Merged PRs (30d)
- 95
Description
My toy server exhausts memory very quickly because every async function call, whether awaited or not, creates a fiber with a 256 KiB stack.
This part may still be a work in progress, but a stackless coroutine implementation based on state machines would likely be much more memory-efficient.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the async-function lowering and fiber stack allocation described in the issue, then measure how much memory is used per call. Determine whether the work-in-progress implementation has a defined scope and identify an existing test or benchmark that can verify reduced allocation without changing async behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100