The path transformation logic is great for reducing IO, but comes at the expense of increased RAM usage since it introduces a clog in the stream. We can resolve this by creating our own version of gulp.src that performs this work during the read phase, which will allow us to perform processing of bundles in a more stream like fashion, namely;
- Start processing a bundle the second we have its resources, and emit its result during the same
_transform invocation that ultimately triggered it.
- Push all files straight on through with required files cloned (we currently can't due to overwrite logic) so that later processing can run.
Final result should be less used RAM and less read operations.
The path transformation logic is great for reducing IO, but comes at the expense of increased RAM usage since it introduces a clog in the stream. We can resolve this by creating our own version of
gulp.srcthat performs this work during the read phase, which will allow us to perform processing of bundles in a more stream like fashion, namely;_transforminvocation that ultimately triggered it.Final result should be less used RAM and less read operations.