vercel / vercel/ncc

Using source map doubles memory usage

Open
#596 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
9.8k
Forks
326
PR merge metrics
No merged PRs in 30d

Description

Running app after compiling with -s option uses ~ 320MB on start, while without the flag it's 150-200MB.
Running pure typescript compiled version, even with require('source-map-support'), does not have this problem

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 reproducing the reported memory usage with ncc's -s option, comparing it with compilation without source maps and with a pure TypeScript build using require('source-map-support'). Trace the source-map handling to identify the cause, then verify that source-map builds no longer show the reported memory increase.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.