@@ -23,7 +23,6 @@ import { CompilerInterface } from './PrepareCompiler';
23
23
import { YamlCompiler } from './YamlCompiler' ;
24
24
import { CubeDictionary } from './CubeDictionary' ;
25
25
import { CompilerCache } from './CompilerCache' ;
26
- import { perfTracker } from './PerfTracker' ;
27
26
28
27
const ctxFileStorage = new AsyncLocalStorage < FileContent > ( ) ;
29
28
@@ -215,9 +214,6 @@ export class DataSchemaCompiler {
215
214
protected async doCompile ( ) {
216
215
const files = await this . repository . dataSchemaFiles ( ) ;
217
216
218
- console . log ( `Compiling ${ files . length } files...` ) ;
219
- const compileTimer = perfTracker . start ( 'doCompile' , true ) ;
220
-
221
217
this . pythonContext = await this . loadPythonContext ( files , 'globals.py' ) ;
222
218
this . yamlCompiler . initFromPythonContext ( this . pythonContext ) ;
223
219
@@ -250,8 +246,6 @@ export class DataSchemaCompiler {
250
246
}
251
247
252
248
const transpile = async ( stage : CompileStage ) : Promise < FileContent [ ] > => {
253
- const transpileTimer = perfTracker . start ( `transpilation-stage-${ stage } ` ) ;
254
-
255
249
let cubeNames : string [ ] = [ ] ;
256
250
let cubeSymbols : Record < string , Record < string , boolean > > = { } ;
257
251
let transpilerNames : string [ ] = [ ] ;
@@ -318,8 +312,6 @@ export class DataSchemaCompiler {
318
312
results = await Promise . all ( toCompile . map ( f => this . transpileFile ( f , errorsReport , { } ) ) ) ;
319
313
}
320
314
321
- transpileTimer . end ( ) ;
322
-
323
315
return results . filter ( f => ! ! f ) as FileContent [ ] ;
324
316
} ;
325
317
@@ -416,8 +408,6 @@ export class DataSchemaCompiler {
416
408
} ) ;
417
409
418
410
const compilePhase = async ( compilers : CompileCubeFilesCompilers , stage : 0 | 1 | 2 | 3 ) => {
419
- const compilePhaseTimer = perfTracker . start ( `compilation-phase-${ stage } ` ) ;
420
-
421
411
// clear the objects for the next phase
422
412
cubes = [ ] ;
423
413
exports = { } ;
@@ -426,9 +416,7 @@ export class DataSchemaCompiler {
426
416
asyncModules = [ ] ;
427
417
transpiledFiles = await transpile ( stage ) ;
428
418
429
- const res = this . compileCubeFiles ( cubes , contexts , compiledFiles , asyncModules , compilers , transpiledFiles , errorsReport ) ;
430
- compilePhaseTimer . end ( ) ;
431
- return res ;
419
+ return this . compileCubeFiles ( cubes , contexts , compiledFiles , asyncModules , compilers , transpiledFiles , errorsReport ) ;
432
420
} ;
433
421
434
422
return compilePhase ( { cubeCompilers : this . cubeNameCompilers } , 0 )
@@ -464,12 +452,6 @@ export class DataSchemaCompiler {
464
452
} else if ( transpilationWorkerThreads && this . workerPool ) {
465
453
this . workerPool . terminate ( ) ;
466
454
}
467
-
468
- // End overall compilation timing and print performance report
469
- compileTimer . end ( ) ;
470
- setImmediate ( ( ) => {
471
- perfTracker . printReport ( ) ;
472
- } ) ;
473
455
} ) ;
474
456
}
475
457
@@ -721,22 +703,16 @@ export class DataSchemaCompiler {
721
703
if ( file . convertedToJs ) {
722
704
this . compileJsFile ( file , errorsReport ) ;
723
705
} else if ( file . fileName . endsWith ( '.js' ) ) {
724
- const compileJsFileTimer = perfTracker . start ( 'compileJsFile' ) ;
725
706
this . compileJsFile ( file , errorsReport , { doSyntaxCheck } ) ;
726
- compileJsFileTimer . end ( ) ;
727
707
} else if ( file . fileName . endsWith ( '.yml.jinja' ) || file . fileName . endsWith ( '.yaml.jinja' ) ||
728
708
( file . fileName . endsWith ( '.yml' ) || file . fileName . endsWith ( '.yaml' ) ) &&
729
709
file . content . match ( JINJA_SYNTAX )
730
710
) {
731
- const compileJinjaFileTimer = perfTracker . start ( 'compileJinjaFile (actually js)' ) ;
732
711
// original jinja/yaml file was already transpiled into js
733
712
this . compileJsFile ( file , errorsReport ) ;
734
- compileJinjaFileTimer . end ( ) ;
735
713
} else if ( file . fileName . endsWith ( '.yml' ) || file . fileName . endsWith ( '.yaml' ) ) {
736
- const compileYamlFileTimer = perfTracker . start ( 'compileYamlFile (actually js)' ) ;
737
714
// original yaml file was already transpiled into js
738
715
this . compileJsFile ( file , errorsReport ) ;
739
- compileYamlFileTimer . end ( ) ;
740
716
}
741
717
}
742
718
0 commit comments