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

[WIP] Tree shaking #7308

Closed
wants to merge 3 commits into from

Conversation

Projects
None yet
2 participants
@twokul
Copy link
Contributor

commented Aug 25, 2017

Ran against a brand new ember application.

Relevant repos:

https://github.com/twokul/broccoli-evict
https://github.com/twokul/assembler

Before:

➜  tree-shake-test git:(master) ✗ ember build --environment=production
cleaning up...
Built project successfully. Stored in "dist/".
File sizes:
 - dist/assets/tree-shake-test-d41d8cd98f00b204e9800998ecf8427e.css: 0 B
 - dist/assets/tree-shake-test-dd4bab0a373ab16e74ba3ab396062ee3.js: 5.22 KB (1.36 KB gzipped)
 - dist/assets/vendor-0d61d4a0db360286ba05f371e537db50.js: 737.37 KB (191.09 KB gzipped)
 - dist/assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css: 0 B

After:

➜  tree-shake-test git:(master) ✗ ember build --environment=production
cleaning up...
Built project successfully. Stored in "dist/".
File sizes:
 - dist/assets/tree-shake-test-d41d8cd98f00b204e9800998ecf8427e.css: 0 B
 - dist/assets/tree-shake-test-dd4bab0a373ab16e74ba3ab396062ee3.js: 5.22 KB (1.36 KB gzipped)
 - dist/assets/vendor-aff4a77e7369abcdead942027854e865.js: 732.69 KB (190.33 KB gzipped)
 - dist/assets/vendor-d41d8cd98f00b204e9800998ecf8427e.css: 0 B

Alex Navasardyan added some commits Aug 3, 2017

@twokul twokul changed the title Graph [WIP] Tree shaking Aug 25, 2017

let name = this.name;
let tree = applicationAndDepsTree;
if (experiments.TREE_SHAKING) {
tree = new BroccoliEvict(applicationAndDepsTree, {

This comment has been minimized.

Copy link
@twokul

twokul Aug 28, 2017

Author Contributor

per conversation with @rwjblue, we should likely create broccoli-assembler & move new Assembler(...) & concat code there.

This comment has been minimized.

Copy link
@twokul

twokul Aug 28, 2017

Author Contributor

make sure to mention timings.

let appJs = concat(applicationAndDepsTree, {
let name = this.name;
let tree = applicationAndDepsTree;
if (experiments.TREE_SHAKING) {

This comment has been minimized.

Copy link
@twokul

twokul Aug 28, 2017

Author Contributor

experiments.TREE_SHAKING && process.env.EXPERIMENTAL_TREE_SHAKING

@twokul twokul referenced this pull request Sep 12, 2017

Merged

Packaging #110

@rwjblue

This comment has been minimized.

Copy link
Member

commented Nov 21, 2017

Closing as I believe this has been surpassed by more recent work, please reopen if this is still being worked on...

@rwjblue rwjblue closed this Nov 21, 2017

@ppcano ppcano referenced this pull request Mar 22, 2019

Open

Tree shaking update #267

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.