From d28d3902c1e0cf197aa2219d77e546cb324de035 Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Mon, 21 Dec 2015 15:44:16 -0500 Subject: [PATCH] Add profiling information to clearly outline slow legacy-style compilers --- tools/isobuild/compiler.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/isobuild/compiler.js b/tools/isobuild/compiler.js index 1185327295..abcafd8e4c 100644 --- a/tools/isobuild/compiler.js +++ b/tools/isobuild/compiler.js @@ -323,7 +323,11 @@ var lintUnibuild = function ({isopack, isopackCache, sourceArch}) { // options.isopack. // // Returns a list of source files that were used in the compilation. -var compileUnibuild = function (options) { +var compileUnibuild = Profile( + function (options) { + return `compileUnibuild (${options.isopack.name || 'the app'})`; + }, + function (options) { buildmessage.assertInCapture(); const isopk = options.isopack; @@ -566,7 +570,9 @@ api.addAssets('${relPath}', 'client').`); }); try { - (buildmessage.markBoundary(classification.legacyHandler))(compileStep); + Profile(`legacyHandler ${classification.extension}`, function () { + (buildmessage.markBoundary(classification.legacyHandler))(compileStep); + })(); } catch (e) { e.message = e.message + " (compiling " + relPath + ")"; buildmessage.exception(e); @@ -609,7 +615,7 @@ api.addAssets('${relPath}', 'client').`); return { pluginProviderPackageNames: pluginProviderPackageNames }; -}; +}); function runLinters({inputSourceArch, isopackCache, sources, sourceProcessorSet, watchSet}) {