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

Use cache for faster bundles? #10

Open
Rich-Harris opened this issue May 28, 2014 · 4 comments
Open

Use cache for faster bundles? #10

Rich-Harris opened this issue May 28, 2014 · 4 comments

Comments

@Rich-Harris
Copy link

Thanks for making this plugin, it's really useful.

We're using it with a fairly complex app, and it takes several seconds for browserify to do its thing. With watchify that wouldn't be a problem, because with each change, only the updated files get reparsed. But with broccoli, the write() function is called whenever the input tree is modified, and the whole tree has to be parsed and bundled, making the feedback loop too slow.

Given broccoli's architecture and stated objectives it seems as though there ought to be a way to do incremental rebundles, similar to watchify. But it's not obvious how to go about it. Before I spend the next few days tearing my hair out, I thought I'd raise the issue here and see if you'd had any thoughts about how that might work?

@Rich-Harris
Copy link
Author

A bit more info, in case it's interesting or relevant: it turns out that the biggest factor in browserify's bundle speed is whether the standalone option is used. In our case it is, and that means the whole thing has to be parsed with esprima so that require calls can be renamed. Discussion here

@eploko
Copy link

eploko commented Nov 16, 2014

@Rich-Harris I see it's been more than half a year since you opened the issue, but maybe you'd find this useful anyway: https://github.com/eploko/broccoli-watchify

@Rich-Harris
Copy link
Author

@eploko thanks!

@stefanpenner
Copy link

old thread yes, but for future travelers: since eploko/broccoli-watchify#2 was just merged and released as 1.0.0 broccoli-watchify now supports caching (its quite fast)

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

No branches or pull requests

3 participants