carrot / roots-browserify

Roots v3 extension that uses browserify as a javascript pipeline
Other
21 stars 8 forks source link

Cache #19

Closed jescalan closed 9 years ago

jescalan commented 9 years ago

Implementing a cache so that compiles are actually fast. Yay!

jescalan commented 9 years ago

Ok so I have not figured out yet how to write a test for this, but did test it out in the context of a real project and it cut down the bundle time by about 50% as sam previously reported from implementing watchify, except it syncs perfectly with roots' watcher and doesn't open a separate process.

I'm pretty much ready to merge up. If anyone can think of a way to implement a test for this it would be much appreciated, but it's pretty nasty. I have the framework for the test in place which boots up a project in watch mode and changes a file, but getting into the internals of the extension from the testing is tough, and using external timing seems like a very dodgy solution.

kylemac commented 9 years ago

just ensuring you see this one (was posted it in carrot slack too) https://github.com/hughsk/disc

jescalan commented 9 years ago

I'm going to merge this, unfortunately coverage won't be as strong, but on the other hand this feature simply was not in the library previously and adds about a 50% speed increase so I think it's worth it to get it in there for now!