vercel-labs / vercel-labs/scriptc

256 KiB fiber stack allocated for every async function

Open
#40 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.