Skip to content

Commit

Permalink
Set max concurrency to 8 instead of the default 16
Browse files Browse the repository at this point in the history
Minifying images is an expensive operation and it doesn't make sense to have such a high concurrency.

Closes sindresorhus#250
  • Loading branch information
sindresorhus committed Mar 25, 2017
1 parent 95cf43e commit 816ecae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ module.exports = (plugins, opts) => {
let totalSavedBytes = 0;
let totalFiles = 0;

return through.obj((file, enc, cb) => {
return through.obj({
maxConcurrency: 8
}, (file, enc, cb) => {
if (file.isNull()) {
cb(null, file);
return;
Expand Down

0 comments on commit 816ecae

Please sign in to comment.