diff --git a/index.js b/index.js index 8ab8c401c..a9f6f7ea7 100755 --- a/index.js +++ b/index.js @@ -1,5 +1,8 @@ #!/usr/bin/env node +// increase the libuv threadpool size to 1.5x the number of logical CPUs. +process.env.UV_THREADPOOL_SIZE = Math.ceil(Math.max(4, require('os').cpus().length * 1.5)); + var fs = require('fs'); var path = require('path'); // node v6 -> v8 compatibility