guard/listen — pull request #56 by Maher4Ever (2012-07-25 01:40:05+00:00)
Title: New adapter for Windows and safer specs for Travis

Hello everyone,

For the last couple of weeks I've been working on a new gem called [WDM](https://github.com/Maher4Ever/wdm) to fix the performance issue Listen had on Windows. I've benchmarked it against FChange and the [results](https://github.com/Maher4Ever/wdm/tree/master/benchmark) were encouraging for me to keep developing it. WDM has some disadvantages too, so here is the quick run down:

Advantages of WDM:
- It's 65175% faster than FChange in reporting changes.
- It can report more changes.
- It simplified the specs because it can detect changes recursively (changes in sub-directories).
- It reports the path of the change and the type of the change.

Disadvantages:
- It only works on ruby > 1.9.2.
- It's an extension, so it needs Devkit on Windows to be installed. But then again, FChange relies on FFI and that's also an extension.
- It's an MRI extension, so it won't run on JRuby or the other implementation for the moment.
- It can't be included as a dependency in the gemspec of Listen as it will blow up while compiling (I still can't find a way in rubygems to specify that a gem can only be compiled on Windows).

WDM has been stable enough for the past 3 days and didn't crash once while I was using it.

As you may know, Listen has had a [performance issue](https://github.com/guard/listen/issues/28) on Windows. So I decided to implement the windows adapter in Listen with WDM and see how it works. It worked quite good and all the specs pass.

I also took the opportunity to make an end to the "russian roulette" we were playing with travis (thanks @netzpirat for this great description :) ). Adapters can now report changes on demand instead of using the latency, which allows us to wait until all tests has run and then check the results. The only disadvantage of this is that tests now require the developer to specify how many change he expects to get.

@guard/listen I'm wondering what you think about these changes. I would say WDM is in the alpha phase right now, so do you think it's a good decision to replace FChange with WDM any time soon? Also, what do you think about the fix for the travis problem?