Repository navigation
JS: Clarify that memory limit is for Node.js process specifically - #23024
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 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-ramcommand-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. */ |
Contributor
Author
There was a problem hiding this comment.
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. |
asgerf
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.