ember-cli/broccoli-caching-writer

Cache and invalidate individual files instead of a whole tree

Closed this issue · 2 comments

If I understood correctly only trees as a whole are cached and invalidated. It would be more efficient to keep track of each file individually, so only actually changed files get updated. The whole tree would still have to be invalidated nevertheless.

But this is probably hard to implement, considering how updateCache(srcDirs, destDir) works right now. We would need a second method like updateFile(srcFile, destFile) that is called individually per file.

Is this out of scope and should be made a seperate plugin?

It would be more efficient to keep track of each file individually, so only actually changed files get updated.

Yep, that is precisely what broccoli-filter does. But it adds a requirement that you are operating on 1:1. broccoli-caching-writer is made for the case where you may have an arrangement of multiple input files to a single output file (like CSS preprocessors or concatenation).

Thanks a lot. I'll look into that.