From dc78645696c5353aa221576e678eb7687f61e3fd Mon Sep 17 00:00:00 2001 From: Simon Friis Vindum Date: Mon, 26 Oct 2026 06:45:10 +0100 Subject: [PATCH] JS: Remove unused TypeScript memory threshold wiring Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed06a454-bbdc-4586-8a7c-a7bc93c59413 --- .../com/semmle/ts/extractor/TypeScriptParser.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptParser.java b/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptParser.java index 09f05b2d9e0b..17989d859a9c 100644 --- a/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptParser.java +++ b/javascript/extractor/src/com/semmle/ts/extractor/TypeScriptParser.java @@ -101,19 +101,16 @@ public class TypeScriptParser { * set to indicate the maximum heap space usable by the Node.js process, in addition to its * "reserve memory". * - *

Defaults to 1.0 GB (for a total heap space of 1.4 GB by default). + *

Defaults to 2000 MB (for a total heap space of 2400 MB by default). */ public static final String TYPESCRIPT_RAM_SUFFIX = "TYPESCRIPT_RAM"; /** * An environment variable (without the SEMMLE_ or LGTM_ prefix), that can be - * set to indicate the amount of heap space the Node.js process should reserve for extracting - * individual files. + * set to indicate the additional heap space added to TYPESCRIPT_RAM when setting the + * Node.js heap limit. * - *

When less than this amount of memory is available, the TypeScript compiler instance is - * restarted to free space. - * - *

Defaults to 400 MB (for a total heap space of 1.4 GB by default). + *

Defaults to 400 MB (for a total heap space of 2400 MB by default). */ public static final String TYPESCRIPT_RAM_RESERVE_SUFFIX = "TYPESCRIPT_RAM_RESERVE"; @@ -306,7 +303,6 @@ private void setupParserWrapper() { ProcessBuilder pb = new ProcessBuilder(cmd); parserWrapperCommand = StringUtil.glue(" ", cmd); - pb.environment().put("SEMMLE_TYPESCRIPT_MEMORY_THRESHOLD", "" + mainMemoryMb); try { pb.redirectError(Redirect.INHERIT); // Forward stderr to our own stderr.