Closed robrich closed 10 years ago
@robrich can you explain this better?
Perhaps "leak" is not the best term. Perhaps better said "excessive memory use."
A plugin should take an input file, do something, and return a result. Collecting all files and doing something at the end is really bad form. The only good use-case I can see is concat()
, but even then, use require
such that you don't need to.
@robrich for plugins that need to operate on all files (mocha, concat, etc.) this is fine
I think this is fine. Am I correct in my assumption that through2 is just causing artificial backpressure in this instance?
This also seems to break the "plugin should do one thing" rule.
cc: @contra, @phated