Log expansion delay

This commit is contained in:
Tony Garnock-Jones 2023-05-03 18:19:48 +03:00
parent 9cf00720f8
commit 1f72baf3ad
1 changed files with 3 additions and 0 deletions

View File

@ -156,6 +156,7 @@ const boot: tslib.server.PluginModuleFactory = ({ typescript: ts }) => {
const diagnostics: Array<{ message: string, start?: Syntax.Pos, end?: Syntax.Pos }> = [];
// console.log(`Syndicate expanding ${name}: ${JSON.stringify(source)}`);
console.log(`Syndicate expanding ${name}`);
const startTime = +new Date();
const { text: expandedText, targetToSourceMap, sourceToTargetMap } = compile({
source,
name,
@ -165,6 +166,8 @@ const boot: tslib.server.PluginModuleFactory = ({ typescript: ts }) => {
diagnostics.push({ message, start, end });
},
});
const stopTime = +new Date();
console.log(`Syndicate expansion of ${name} took ${stopTime - startTime} ms`);
const sourceFile = makeSourceFile(expandedText);
return {
expandedText,