michaelficarra / commonjs-everywhere

:rainbow: minimal CommonJS browser bundler with aliasing, extensibility, and source maps
BSD 3-Clause "New" or "Revised" License
158 stars 21 forks source link

Refactor to use a disk-persistent cache. #84

Closed tarruda closed 11 years ago

tarruda commented 11 years ago

This should speed up future rebuilds more than the old in-memory cache, as it will also cache the preprocessed AST and only re-read/parse files that were modified. The speed gain should be even greater on compile-to-js languages as recompilation of unmodified files will be completely skipped. Fixes #83.

I've noticed a small speed loss on the first build probably due to stringifying/writing cache to disk, but after that every rebuild is faster than before.

tarruda commented 11 years ago

I'm closing some this pull request because I've changed the code too much

michaelficarra commented 11 years ago

Why did you push all of this to master? This could have been useful...

tarruda commented 11 years ago

You can still merge if you need, but since I refactored so much I assumed you would not want it

tarruda commented 11 years ago

Besides the code kinda dirty, I wasnt careful about code style or organization

tarruda commented 11 years ago

I have documented the modifications here: https://github.com/tarruda/powerbuild

It also fixes #79, #63 and my own issue #83