broccolijs/broccoli — pull request #153 by ppcano (2014-05-24 14:34:06+00:00)
Title: Call `read` only on the trees that have changed dependents

It removes the need to rerun all the filters when a file has changed, therefore it improves the build total time in some specific cases.

Optionally, the filter must define an `isUnchanged` function which defines if its output has changed since the last build.

```js
MyFilter.prototype.isUnchanged = function () {

var lastHash = this.inputFiles.hash,
baseDir = this.inputFiles.baseDir,
files = this.inputFiles.files;

var hash = helpers.hashStrings( getFileKeys(baseDir, files) );
return lastHash === hash;
}
```

Filters which depends on other filters will always provide its result based on the result of every dependent filter.

*This is a first version pending of review which has been successfully tested by implementing the `isUnchanged` function to the `StaticCompilerFilter`.*