Use cache for faster bundles? #10

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

Comments

Projects
None yet
3 participants
@Rich-Harris

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

This comment has been minimized.

Show comment
Hide comment
@Rich-Harris

Rich-Harris May 28, 2014

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

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

This comment has been minimized.

Show comment
Hide comment
@eploko

eploko 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

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

This comment has been minimized.

Show comment
Hide comment

@eploko thanks!

@stefanpenner

This comment has been minimized.

Show comment
Hide comment
@stefanpenner

stefanpenner Sep 12, 2016

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)

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