Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the build! #16482

Merged
merged 19 commits into from
Apr 11, 2018
Merged

Refactor the build! #16482

merged 19 commits into from
Apr 11, 2018

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Apr 10, 2018

  • Enable easy dynamic package creation (no special sauce to add a new package, just do it...)
  • Enable seamless .ts usage throughout all of packages/** (just rewrite a file from *.js to *.ts and make linting happy 😝 )
  • Remove arbitrary filtering/building of packages and simplify what is included and excluded from various builds.

TODO:

  • Remove lib/packages.js
  • Make adding new packages/*/tests "just work" with each-package-tests
  • Fix node test runs
  • Add ember-utils package to ember-template-compiler.js asset

@rwjblue
Copy link
Member Author

rwjblue commented Apr 10, 2018

I have uploaded a tarball including dist here if anyone wants to review the build output...

@stefanpenner
Copy link
Member

Can you share the before/after slow-tress output for cold build and js rebuild ?

@rwjblue
Copy link
Member Author

rwjblue commented Apr 11, 2018

The timings seem roughly unchanged (expand for specifics...)

Before

Cold Initial Build

Build successful (77367ms) – Serving on http://localhost:7020/

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
Babel (57)                                    | 67061ms (1176 ms)
TypeScriptPlugin (1)                          | 4371ms

Warm Initial Build

Build successful (11229ms) – Serving on http://localhost:7020/

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
TypeScriptPlugin (1)                          | 4245ms
Rollup (26)                                   | 3253ms (125 ms)
Babel (57)                                    | 1580ms (27 ms)
Concat (5)                                    | 950ms (190 ms)

JS Rebuild

Build successful (2708ms) – Serving on http://localhost:7020/

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
broccoli-typescript-compiler (1)              | 2376ms

After

Cold Initial Build

Build successful (79002ms) – Serving on http://localhost:7020/

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
Babel (7)                                     | 66325ms (9475 ms)
Rollup (21)                                   | 5227ms (248 ms)
TypeScriptPlugin (1)                          | 4704ms

Warm Initial Build

Build successful (12413ms) – Serving on http://localhost:7020/

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
Rollup (21)                                   | 4389ms (209 ms)
TypeScriptPlugin (1)                          | 4055ms
Babel (7)                                     | 1697ms (242 ms)
Funnel (16)                                   | 898ms (56 ms)
Concat (5)                                    | 750ms (150 ms)

JS Rebuild

Build successful (2674ms) – Serving on http://localhost:7020/

Slowest Nodes (totalTime => 5% )              | Total (avg)
----------------------------------------------+---------------------
broccoli-typescript-compiler (1)              | 1578ms
Rollup: rollup ember-metal (1)                | 247ms
Rollup: rollup ember-glimmer (1)              | 240ms
Funnel (16)                                   | 229ms (14 ms)

@rwjblue rwjblue merged commit 8b24b9c into emberjs:master Apr 11, 2018
@rwjblue rwjblue deleted the streamlined-build-refactor branch April 11, 2018 15:51
@stefanpenner
Copy link
Member

stefanpenner commented Apr 11, 2018

Warm Initial Build

before:  2708ms
after:  12413ms

this seems like a regression?

@rwjblue
Copy link
Member Author

rwjblue commented Apr 11, 2018

The cold initial and rebuild times are roughly the same, and I didn't compare the warm initial build times after prepping the numbers. Will dig into it a bit and see what we can do to improve.

Ultimately, IMHO the overall benefits of this PR (mentioned in the PR description) are significant and are valuable enough to justify the (hopefully temporary) warm initial build regression...

@rwjblue
Copy link
Member Author

rwjblue commented Apr 11, 2018

After starting to poke at that, I realized that the numbers you were comparing were the "Before: JS rebuild" time and "After: Warm Initial Build" time. This is because I had forgotten to paste in the "Before: Warm Initial Build" time 😭.

I've updated the comment above, but here is a screenshot of what it was before (where I accidentally trolled you 😢 ):

original screenshot

Ultimately, I still think there is a small regression for initial builds (~ 3% on initial cold, ~ 9% on initial warm) but a small improvement for rebuilds. Definitely still room for improvement!

@stefanpenner
Copy link
Member

Ultimately, I still think there is a small regression for initial builds (~ 3% on initial cold, ~ 9% on initial warm) but a small improvement for rebuilds. Definitely still room for improvement!

😄 1

ya that type of regression isn't fatal, carry on. Thanks for digging in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants