Skip to content

JS: Clarify that memory limit is for Node.js process specifically - #23024

Merged
paldepind merged 1 commit into
mainfrom
js/memory-limits-docs
Nov 5, 2026
Merged

paldepind merged 1 commit into
mainfrom
js/memory-limits-docs

Conversation

@paldepind

Copy link
Copy Markdown
Contributor

Alternative to #22991. Instead of removing the memory limit, these changes make it clear that the limit is not for the "TypeScript compiler" but more narrowly for the Node.js process.

@paldepind
paldepind marked this pull request as ready for review November 5, 2026 09:52
@paldepind
paldepind requested review from a team as code owners November 5, 2026 09:52
Copilot AI auto review requested due to automatic review settings November 5, 2026 09:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Active documentation issues remain around the TypeScript memory base value and added reserve, including an inaccurate default and misleading memory-split comments.

5 open issues
What changed in this PR

Clarifies that the JavaScript extractor’s memory setting applies to the Node.js process, specifically its V8 old-space configuration, rather than directly to the TypeScript compiler.

Changes:

  • Updates Unix and Windows autobuild comments to describe Node.js memory allocation.
  • Revises extractor configuration and API documentation.
  • Updates --typescript-ram command-line help text.

This pull request is ready to be approved.

File Summary
javascript/​resources/​tools/​autobuild.sh Clarifies the Node.js memory allocation comment for Unix builds.
javascript/​resources/​tools/​autobuild.cmd Applies the equivalent memory-allocation clarification for Windows builds.
javascript/​extractor/​src/​com/​semmle/​ts/​extractor/​TypeScriptParser.java Documents the memory setting’s Node.js V8 scope.
javascript/​extractor/​src/​com/​semmle/​js/​extractor/​Main.java Updates the --typescript-ram help text.
javascript/​extractor/​src/​com/​semmle/​js/​extractor/​ExtractorConfig.java Clarifies the configured memory field’s purpose.

Review effort: Lite (auto)

private boolean extractLines;

/** Override amount of RAM to allocate to the TypeScript compiler. */
/** Override the amount of RAM for the Node.js process. */

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might make sense and I can look into this is a human agrees, but I think the scope of this PR is just to remove references to the "TypeScript compiler".

P_TYPESCRIPT_RAM,
1,
"Amount of memory allocated to the TypeScript compiler process. The default is 1G.");
"Amount of memory assigned to the Node.js process's V8 old-space limit. The default is 1G.");
private TypeScriptParserMetadata metadata;

/** Sets the amount of RAM to allocate to the TypeScript compiler.s */
/** Sets the amount of RAM for the Node.js process's V8 old-space limit. */
set jvm_args=-Xss16m

rem If CODEQL_RAM is set, use half for Java and half for TS.
rem If CODEQL_RAM is set, use half for Java and half for Node.js.
jvm_args=-Xss16m

# If CODEQL_RAM is set, use half for Java and half for TS.
# If CODEQL_RAM is set, use half for Java and half for Node.js.
@github-actions github-actions Bot added the JS label Nov 5, 2026
@paldepind
paldepind merged commit 8788228 into main Nov 5, 2026
18 checks passed
@paldepind
paldepind deleted the js/memory-limits-docs branch November 5, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants