Skip to content
This repository has been archived by the owner on Aug 7, 2018. It is now read-only.

2-pass system #19

Open
amcdnl opened this issue Mar 24, 2015 · 5 comments
Open

2-pass system #19

amcdnl opened this issue Mar 24, 2015 · 5 comments
Labels

Comments

@amcdnl
Copy link
Contributor

amcdnl commented Mar 24, 2015

Investigate whether a 2-pass system would be more ideal. I'm not sure since it might try to over-optimize though and end up with huge bundles.

Idea from: https://www.youtube.com/watch?v=C-kM0v9L9UY&feature=youtu.be

@lookfirst
Copy link
Contributor

I was just reading the documentation and wondering why we didn't use this approach:

https://github.com/systemjs/builder#example---trace-builds

It feels like we just build up the routes as individual trace()'s and then intersect the trees.

@amcdnl
Copy link
Contributor Author

amcdnl commented Mar 24, 2015

This must be new. I haven't seen this before ....

@marjan-georgiev - any thoughts?

@marjan-georgiev
Copy link
Member

We are using that approach though. Using trace to pull dependency trees for individual modules, and then running an algorithm to calculate the bundles.

@marjan-georgiev
Copy link
Member

I'll need to run some benchmarks on that second pass that stealjs does. That's tricky to get right, and it really depends on the nature of the project. In some cases it might do more harm than good.

@lookfirst
Copy link
Contributor

Oh yea, I just noticed the trace() usage too. Sorry about that! =)

One question, what is the difference between the treeCache and treeIndex? https://github.com/Swimlane/systemjs-route-bundler/blob/master/lib/tree-walker.js#L24

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

No branches or pull requests

3 participants