gulpjs / glob-stream

Readable streamx interface over anymatch.
MIT License
178 stars 53 forks source link

use Minimatch class to improve perf, fixes #29; fix RegExp handling #30

Closed UltCombo closed 9 years ago

UltCombo commented 9 years ago

Improve negative globs handling perf and fix some issues with RegExp.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+1.55%) when pulling e7af5f8573d5658839daa4f964dd24119c444511 on UltCombo:minimatch-class into 127eb2c1c7c865812ccafdf5802cb8432aa15b40 on wearefractal:master.

UltCombo commented 9 years ago

@contra BTW, there is just one line missing to hit 100% coverage. Perhaps we should throw instead of returning true for unknown glob types? https://coveralls.io/files/408135441#L105

UltCombo commented 9 years ago

Here are the benchmarks to prove the perf gain.

Before: image

After: image

Benchmark source: sindresorhus/globby#10 (irrelevant globby data omitted) The benchmark with fewer exclusions is slower because it has the overhead of emitting more matched files.

UltCombo commented 9 years ago

I may have misunderstood the regex matching part though, it would make more sense if the regexp.test() returns true == keep file, else filter it out.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+1.55%) when pulling e2f5e340b7c1af595f78038825f4dfffab728f55 on UltCombo:minimatch-class into 127eb2c1c7c865812ccafdf5802cb8432aa15b40 on wearefractal:master.

UltCombo commented 9 years ago

@contra PTAL when you have time.

sindresorhus commented 9 years ago

Nice!

UltCombo commented 9 years ago

Oh sorry, mixing too many topics here. Moved the glob-stream and globby topic to #31

yocontra commented 9 years ago

The RegExp stuff should keep the file if the regex returns true, otherwise filter it out as implemented. Want to write some tests to ensure this is happening?

UltCombo commented 9 years ago

@contra I did, see the files changed tab. :smiley: