{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6137","repository_url":"https://api.github.com/repos/ember-cli/ember-cli","labels_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6137/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6137/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6137/events","html_url":"https://github.com/ember-cli/ember-cli/issues/6137","id":168737172,"number":6137,"title":"A 9-10 minute first load time (not build, this is require / fs read time)","user":{"login":"musaffa","id":294616,"avatar_url":"https://avatars.githubusercontent.com/u/294616?v=3","gravatar_id":"","url":"https://api.github.com/users/musaffa","html_url":"https://github.com/musaffa","followers_url":"https://api.github.com/users/musaffa/followers","following_url":"https://api.github.com/users/musaffa/following{/other_user}","gists_url":"https://api.github.com/users/musaffa/gists{/gist_id}","starred_url":"https://api.github.com/users/musaffa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/musaffa/subscriptions","organizations_url":"https://api.github.com/users/musaffa/orgs","repos_url":"https://api.github.com/users/musaffa/repos","events_url":"https://api.github.com/users/musaffa/events{/privacy}","received_events_url":"https://api.github.com/users/musaffa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2016-08-01T20:41:22Z","updated_at":"2016-08-01T22:27:33Z","closed_at":"2016-08-01T22:23:13Z","body":"## Setup\r\n\r\nOutput from ember version --verbose:\r\n```\r\nember-cli: 2.7.0\r\nhttp_parser: 2.7.0\r\nnode: 6.3.1\r\nv8: 5.0.71.57\r\nuv: 1.9.1\r\nzlib: 1.2.8\r\nares: 1.10.1-DEV\r\nicu: 57.1\r\nmodules: 48\r\nopenssl: 1.0.2h\r\nos: linux x64 (ubuntu 16.04 LTS)\r\n```\r\n\r\n## Time required\r\n\r\nI've created a vanilla ember app with with `ember new` command, cd into the directory and run the ember server.\r\n\r\nHere's the output with `time-require` enabled:\r\n\r\n```\r\nLivereload server on http://localhost:49152\r\nServing on http://localhost:4200/\r\n\r\nBuild successful - 80019ms.\r\n\r\nSlowest Trees                                 | Total               \r\n----------------------------------------------+---------------------\r\nBabel                                         | 13367ms             \r\nBabel                                         | 8426ms              \r\nSourceMapConcat: Concat: Addon JS             | 4163ms              \r\n\r\nSlowest Trees (cumulative)                    | Total (avg)         \r\n----------------------------------------------+---------------------\r\nBabel (12)                                    | 31643ms (2636 ms)   \r\nSourceMapConcat: Concat: Addon JS (1)         | 4163ms              \r\nFunnel: Addon JS (6)                          | 4003ms (667 ms)     \r\n\r\n\r\nStart time: (2016-08-01 19:46:09 UTC) [treshold=1%]\r\n #  module                              time  %\r\n 1  ../models/proj...s/project.js)      6.2s  ▇ 1%\r\n 2  /media/musaffa...cli/index.js)     10.4s  ▇ 2%\r\n 3  ../dist/cjs/ha...andlebars.js)      6.5s  ▇ 1%\r\n 4  handlebars (no...lib/index.js)      6.8s  ▇ 1%\r\n 5  ./middleware (...iddleware.js)      7.3s  ▇ 1%\r\n 6  ./server (node...ib/server.js)     11.9s  ▇ 2%\r\n 7  ember-cli-broc...lib/index.js)     17.5s  ▇ 3%\r\n 8  lodash/array/u...rray/uniq.js)      6.6s  ▇ 1%\r\n 9  ../../types (n...pes/index.js)     18.3s  ▇ 3%\r\n10  ../../../trans...ers/react.js)     18.4s  ▇ 3%\r\n11  ./lib/virtual-...ual-types.js)     18.6s  ▇ 3%\r\n12  babylon (node_...lib/index.js)      6.5s  ▇ 1%\r\n13  ../../helpers/...ers/parse.js)      6.6s  ▇ 1%\r\n14  ./replacement...placement.js)       7.4s  ▇ 1%\r\n15  ./path (node_m...ath/index.js)     32.4s  ▇▇ 6%\r\n16  ./context (nod...l/context.js)     32.7s  ▇▇ 6%\r\n17  ../traversal (...sal/index.js)       35s  ▇▇ 6%\r\n18  ./plugin-pass...ugin-pass.js)      35.1s  ▇▇ 6%\r\n19  ../modules (no...les/index.js)      7.4s  ▇ 1%\r\n20  ../../generati...ion/index.js)      6.6s  ▇ 1%\r\n21  ./file (node_m...ile/index.js)     20.8s  ▇▇ 4%\r\n22  ./plugin (node...on/plugin.js)     56.3s  ▇▇▇ 10%\r\n23  ../transformer...ansformer.js)     56.4s  ▇▇▇ 10%\r\n24  ./file/plugin-...n-manager.js)     56.6s  ▇▇▇ 10%\r\n25  ./pipeline (no.../pipeline.js)     57.2s  ▇▇▇ 10%\r\n26  recast (node_m...cast/main.js)      7.2s  ▇ 1%\r\n27  ./lib/visit (n...lib/visit.js)      8.2s  ▇ 1%\r\n28  regenerator (n...ator/main.js)      9.1s  ▇ 2%\r\n29  ./other/regene...generator.js)      9.3s  ▇ 2%\r\n30  ./transformers...ers/index.js)     30.6s  ▇▇ 5%\r\n31  ../transformat...ion/index.js)  1m 28.5s  ▇▇▇▇▇ 15%\r\n32  ./lib/api/node.../api/node.js)  1m 31.2s  ▇▇▇▇▇ 16%\r\n33  babel-core (no...ore/index.js)  1m 31.4s  ▇▇▇▇▇ 16%\r\n34  broccoli-persi...ter/index.js)      7.5s  ▇ 1%\r\n35  broccoli-babel...ler/index.js)  1m 39.5s  ▇▇▇▇▇▇ 17%\r\n36  broccoli-cachi...ter/index.js)      6.5s  ▇ 1%\r\n37  ./concat (node...at/concat.js)      7.2s  ▇ 1%\r\n38  broccoli-conca...cat/index.js)      7.4s  ▇ 1%\r\n39  fs-extra (node...lib/index.js)      7.2s  ▇ 1%\r\n40  broccoli-confi...ace/index.js)      9.8s  ▇ 2%\r\n41  ember-cli/lib/...ember-app.js)   2m 3.7s  ▇▇▇▇▇▇▇ 22%\r\n42  /media/musaffa...cli-build.js)   2m 3.7s  ▇▇▇▇▇▇▇ 22%\r\n43  broccoli-persi...ter/index.js)      8.9s  ▇ 2%\r\n44  ./index (node_...ars/index.js)      9.3s  ▇ 2%\r\n45  ../../types (n...pes/index.js)      9.5s  ▇ 2%\r\n46  ../../../trans...ers/react.js)      9.6s  ▇ 2%\r\n47  ./lib/virtual-...ual-types.js)      9.7s  ▇ 2%\r\n48  ./path (node_m...ath/index.js)     19.7s  ▇▇ 3%\r\n49  ./context (nod...l/context.js)       20s  ▇▇ 3%\r\n50  ../traversal (...sal/index.js)     21.3s  ▇▇ 4%\r\n51  ./plugin-pass...ugin-pass.js)      21.3s  ▇▇ 4%\r\n52  ./file (node_m...ile/index.js)     14.9s  ▇ 3%\r\n53  ./plugin (node...on/plugin.js)     36.6s  ▇▇ 6%\r\n54  ../transformer...ansformer.js)     36.7s  ▇▇ 6%\r\n55  ./file/plugin-...n-manager.js)     36.9s  ▇▇ 6%\r\n56  ./pipeline (no.../pipeline.js)     37.3s  ▇▇ 7%\r\n57  ./lib/visit (n...lib/visit.js)      6.3s  ▇ 1%\r\n58  regenerator (n...ator/main.js)      6.9s  ▇ 1%\r\n59  ./other/regene...generator.js)        7s  ▇ 1%\r\n60  ./transformers...ers/index.js)     24.9s  ▇▇ 4%\r\n61  ../transformat...ion/index.js)   1m 2.7s  ▇▇▇▇ 11%\r\n62  ./lib/api/node.../api/node.js)   1m 4.6s  ▇▇▇▇ 11%\r\n63  babel-core (no...ore/index.js)   1m 4.7s  ▇▇▇▇ 11%\r\n64  broccoli-persi...ter/index.js)      6.9s  ▇ 1%\r\n65  broccoli-babel...ler/index.js)  1m 19.4s  ▇▇▇▇▇ 14%\r\n66  ./lib/express...b/express.js)       6.6s  ▇ 1%\r\n67  express (node_...ess/index.js)      6.7s  ▇ 1%\r\nTotal require(): 8441\r\nTotal time: 9m 32s\r\n```\r\n\r\nIf I restart the server then I get the the following result:\r\n\r\n```\r\nLivereload server on http://localhost:49152\r\nServing on http://localhost:4200/\r\n\r\nBuild successful - 2230ms.\r\n\r\nSlowest Trees                                 | Total               \r\n----------------------------------------------+---------------------\r\nBabel                                         | 213ms               \r\nSourceMapConcat: Concat: Vendor /assets/ve... | 159ms               \r\nBabel                                         | 150ms               \r\n\r\nSlowest Trees (cumulative)                    | Total (avg)         \r\n----------------------------------------------+---------------------\r\nBabel (12)                                    | 637ms (53 ms)       \r\nSourceMapConcat: Concat: Vendor /asset... (1) | 159ms               \r\n\r\n\r\nStart time: (2016-08-01 20:04:10 UTC) [treshold=1%]\r\n #  module                           time  %\r\n 1  ../models/proj...s/project.js)  281ms  ▇ 1%\r\n 2  /media/musaffa...cli/index.js)  463ms  ▇ 2%\r\n 3  ./plugin (node...on/plugin.js)  339ms  ▇ 1%\r\n 4  ../transformer...ansformer.js)  340ms  ▇ 1%\r\n 5  ./file/plugin-...n-manager.js)  342ms  ▇ 1%\r\n 6  ./pipeline (no.../pipeline.js)  345ms  ▇ 1%\r\n 7  ../transformat...ion/index.js)  623ms  ▇ 2%\r\n 8  ./lib/api/node.../api/node.js)  633ms  ▇ 2%\r\n 9  babel-core (no...ore/index.js)  634ms  ▇ 2%\r\n10  broccoli-babel...ler/index.js)  677ms  ▇ 2%\r\n11  ember-cli/lib/...ember-app.js)  872ms  ▇ 3%\r\n12  /media/musaffa...cli-build.js)  872ms  ▇ 3%\r\n13  ./plugin (node...on/plugin.js)  333ms  ▇ 1%\r\n14  ../transformer...ansformer.js)  334ms  ▇ 1%\r\n15  ./file/plugin-...n-manager.js)  337ms  ▇ 1%\r\n16  ./pipeline (no.../pipeline.js)  340ms  ▇ 1%\r\n17  ../transformat...ion/index.js)  609ms  ▇ 2%\r\n18  ./lib/api/node.../api/node.js)  618ms  ▇ 2%\r\n19  babel-core (no...ore/index.js)  619ms  ▇ 2%\r\n20  broccoli-babel...ler/index.js)  755ms  ▇ 3%\r\nTotal require(): 8441\r\nTotal time: 11s\r\n```\r\n\r\nThis gives a satisfactory result.\r\n\r\nBut If I reboot the computer and then run this server, it again starts to take around 9 to 10 minutes to build the app just like the first output scenario.\r\n\r\n## Debug Output\r\n\r\nHere's the debug output of the first build with `DEBUG=*` settings enabled: https://gist.github.com/musaffa/3820d26eb06e41f81784d1579e661801\r\n\r\nThe greatest delays occur at [ember-cli:registry](https://gist.github.com/musaffa/3820d26eb06e41f81784d1579e661801#file-output-log-L1162) - 3 minute 15 seconds:\r\n```\r\nMon, 01 Aug 2016 18:33:36 GMT ember-cli:watcher watchman 4.5.0 does satisfy: >= 3.0.0\r\nMon, 01 Aug 2016 18:36:51 GMT ember-cli:registry add type: js, name: ember-cli-babel, extension:js, options:undefined\r\n```\r\n\r\nThen at async-disk-cache - 1 minute 13 second delay:\r\n```\r\nMon, 01 Aug 2016 18:37:02 GMT ember-cli:registry loading htmlbars-ast-plugin: available plugins ; found plugins ;\r\nMon, 01 Aug 2016 18:38:15 GMT async-disk-cache new Cache { root: /tmp/if-you-need-to-delete-this-open-an-issue-async-disk-cache/ef5ea5c2c57032da13f0e43785ab4cb6, compression: deflate }\r\n```\r\nThen at async-disk-cache - 3 minute 51 seconds:\r\n```\r\nMon, 01 Aug 2016 18:38:16 GMT ember-cli:preprocessors processing ember-cli-babel\r\nMon, 01 Aug 2016 18:42:07 GMT async-disk-cache new Cache { root: /tmp/if-you-need-to-delete-this-open-an-issue-async-disk-cache/467a766139d2aad8bd700a63ebf2abf3, compression: deflate }\r\n```\r\n\r\nAnd so on.\r\n\r\n## Problems at a glance:\r\n\r\n- The Initial build after the project creation is very slow (9-10 min).\r\n- Restart the server. Now it builds faster (2-15 s).\r\n- Reboot the computer. Now again the build becomes very slow (9-10 min).\r\n- Restart the server. Now it builds faster (2-15 s)."},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli/issues/comments/236727130","html_url":"https://github.com/ember-cli/ember-cli/issues/6137#issuecomment-236727130","issue_url":"https://api.github.com/repos/ember-cli/ember-cli/issues/6137","id":236727130,"user":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T22:27:32Z","updated_at":"2016-08-01T22:27:32Z","body":"@musaffa <"}}
{"actor":{"display_login":"stefanpenner"}}