It looks like 1.7.1 still needs to build the legacy bundle synchronously on a cold start, but defers it on hot reloads.
If you set the environment variable METEOR_PROFILE=100
it will log out how long the build takes.
The number 100
is the number of milisecods a task needs to take before it appears in the profile log, so this one will be filtered to show longer operations
If you want to see every step, set it to 0
And If you want to see even more output, set METEOR_DEBUG_BUILD=1
And if you want even more, Qualia have made a great profiling tool to generate a flamechart of CPU usage during meteor builds (and runtime): https://github.com/qualialabs/profile
5 minutes is unusual, so it might be worth looking at, but at the same time, if warm starts and dev rebuilds are fast, it might not be worth it
For comparison, on the project I’m currently working on (1.7.1-rc0)
Summary
Cold Start
| (#1) Total: 6,709 ms (ProjectContext resolveConstraints)
| (#2) Total: 4,455 ms (ProjectContext prepareProjectForBuild)
| (#3) Total: 64,269 ms (Build App)
=> Started MongoDB.
| (#1) Total: 1,583 ms (Server startup)
=> Started your app.
=> App running at: http://localhost:3000/
Warm start
| (#1) Total: 1,379 ms (ProjectContext resolveConstraints)
| (#2) Total: 3,056 ms (ProjectContext prepareProjectForBuild)
| (#3) Total: 10,982 ms (Build App)
=> Started MongoDB.
| (#1) Total: 1,235 ms (Server startup)
=> Started your app.
=> App running at: http://localhost:3000/
Hot reload (client only)
| (#4) Total: 163 ms (ProjectContext prepareProjectForBuild)
| (#5) Total: 725 ms (Rebuild App)
=> Client modified – refreshing
=> Finished delayed build of web.browser.legacy in 1444ms
Hot reload (server & client)
| (#6) Total: 206 ms (ProjectContext prepareProjectForBuild)
| (#7) Total: 1,050 ms (Rebuild App)
| (#1) Total: 1,268 ms (Server startup)
=> Meteor server restarted
=> Finished delayed build of web.browser.legacy in 2218ms
Notice how 1.7.1’s deferred legacy build saves 50-66% of reload times