Merge pull request #1970 from bdash/source_watcher-poll_once-perf

Eliminate quadratic behavior in SourceWatcher::poll_once!
fix/fix-watcher-config
Eliott Appleford 2016-08-11 10:02:38 +01:00 committed by GitHub
commit c264b05906
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ module Middleman
Contract ArrayOf[Pathname]
def poll_once!
updated = ::Middleman::Util.all_files_under(@directory.to_s, &method(:should_not_recurse?))
removed = @files.keys.reject { |p| updated.include?(p) }
removed = @files.keys - updated
result = update(updated, removed)