broccolijs/broccoli-filter — pull request #11 by sebastianseilund (2014-09-15 00:52:46+00:00)
Title: Use symlinking

I updated this plugin to follow symlinks and to use symlinks itself for all the files that are not filtered.

It intelligently figures out if an entire directory doesn't need filtering and then symlinks the entire directory instead of symlinking each file. This speeds up performance a lot in many cases.

## Benchmarks

### Setup

Setup the [benchmark project](https://github.com/sebastianseilund/benchmark-broccoli-filter). It contains a couple hundred .js files and 100 .hbs files. It resembles a typical Ember app. It's `Brocfile.js` filters all .hbs files to be .js files.

```
git clone git@github.com:sebastianseilund/benchmark-broccoli-filter.git
cd benchmark-broccoli-filter
npm install
```

## Running benchmarks for master

```
rm -rf node_modules/broccoli-filter
npm install https://github.com/broccolijs/broccoli-filter/tarball/master
node benchmark.js
```

## Running benchmarks for this branch

```
rm -rf node_modules/broccoli-filter
npm install https://github.com/sebastianseilund/broccoli-filter/tarball/make-it-so
node benchmark.js
```

### Results

All times are in ms. Lower is better.

| Branch | First build average | Rebuilds average |
| --- | --- | --- |
| master | 168 | 132 |
| make-it-so | 54 | 28 |

`broccoli build` runs 4-5x faster using this branch for the benchmark project.