diff --git a/react-packager/src/DependencyResolver/DependencyGraph/index.js b/react-packager/src/DependencyResolver/DependencyGraph/index.js index e66191e4..7e718582 100644 --- a/react-packager/src/DependencyResolver/DependencyGraph/index.js +++ b/react-packager/src/DependencyResolver/DependencyGraph/index.js @@ -101,7 +101,7 @@ class DependencyGraph { this._loading = Promise.all([ this._fastfs.build() .then(() => { - const hasteActivity = Activity.startEvent('haste map'); + const hasteActivity = Activity.startEvent('Building Haste Map'); this._buildHasteMap().then(() => Activity.endEvent(hasteActivity)); }), this._buildAssetMap_DEPRECATED(), @@ -518,9 +518,18 @@ class DependencyGraph { fastfs.on('change', this._processAssetChange_DEPRECATED.bind(this)); return fastfs.build().then( - () => fastfs.findFilesByExts(this._opts.assetExts).map( - file => this._processAsset_DEPRECATED(file) - ) + () => { + const processAsset_DEPRECATEDActivity = Activity.startEvent( + 'Building (deprecated) Asset Map', + ); + + const assets = fastfs.findFilesByExts(this._opts.assetExts).map( + file => this._processAsset_DEPRECATED(file) + ); + + Activity.endEvent(processAsset_DEPRECATEDActivity); + return assets; + } ); } diff --git a/react-packager/src/DependencyResolver/fastfs.js b/react-packager/src/DependencyResolver/fastfs.js index 67f7076e..88429602 100644 --- a/react-packager/src/DependencyResolver/fastfs.js +++ b/react-packager/src/DependencyResolver/fastfs.js @@ -1,5 +1,6 @@ 'use strict'; +const Activity = require('../Activity'); const Promise = require('promise'); const {EventEmitter} = require('events'); @@ -28,6 +29,7 @@ class Fastfs extends EventEmitter { ); return this._crawling.then(files => { + const fastfsActivity = Activity.startEvent('Building in-memory fs'); files.forEach(filePath => { if (filePath.match(rootsPattern)) { const newFile = new File(filePath, { isDir: false }); @@ -44,6 +46,7 @@ class Fastfs extends EventEmitter { } } }); + Activity.endEvent(fastfsActivity); this._fileWatcher.on('all', this._processFileChange.bind(this)); }); }