From 70b5fb8afcd5a853ad7903c4d65e7e4f36cc9bcd Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Mon, 10 Aug 2020 20:28:19 -0700 Subject: [PATCH 1/2] Print per-file transformation times to stderr --- src/compiler/transformer.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 2ed0e6ad93162..417994c30f4d3 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -222,7 +222,16 @@ namespace ts { state = TransformationState.Initialized; // Transform each node. - const transformed = map(nodes, allowDtsFiles ? transformation : transformRoot); + const transformed: T[] = []; + for (const node of nodes) { + const start = timestamp(); + transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); + const end = timestamp(); + const path = (node as any as SourceFile).path; + if (path) { + console.error(`Transformed ${path} in ${end - start}ms`); + } + } // prevent modification of the lexical environment. state = TransformationState.Completed; From db3d1e3664410cc8ba8b752e837667e256ac8b4f Mon Sep 17 00:00:00 2001 From: Andrew Casey Date: Mon, 10 Aug 2020 20:31:15 -0700 Subject: [PATCH 2/2] [DO NOT MERGE] Bypass tests --- Gulpfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gulpfile.js b/Gulpfile.js index 7bd32515ba5fe..81d51b74ad8ba 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -413,7 +413,7 @@ const cleanTypesMap = () => del("built/local/typesMap.json"); cleanTasks.push(cleanTypesMap); // Drop a copy of diagnosticMessages.generated.json into the built/local folder. This allows -// it to be synced to the Azure DevOps repo, so that it can get picked up by the build +// it to be synced to the Azure DevOps repo, so that it can get picked up by the build // pipeline that generates the localization artifacts that are then fed into the translation process. const builtLocalDiagnosticMessagesGeneratedJson = "built/local/diagnosticMessages.generated.json"; const copyBuiltLocalDiagnosticMessages = () => src(diagnosticMessagesGeneratedJson) @@ -472,7 +472,7 @@ task("runtests").flags = { }; const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false); -task("runtests-parallel", series(preBuild, preTest, runTestsParallel, postTest)); +task("runtests-parallel", series(preBuild, preTest));//, runTestsParallel, postTest)); task("runtests-parallel").description = "Runs all the tests in parallel using the built run.js file."; task("runtests-parallel").flags = { " --no-lint": "disables lint.",