Run chrome in silent mode. I saw a fantastic performance improvement.
gulp.task('test-headless-chrome', function (done) {
process.env.DISPLAY=':95';
withXvfb(function(stop) {
server.start({
configFile: __dirname + '/../karma/karma.conf.js',
singleRun: true
}, function() {
stop();
done();
});
});
});
function withXvfb(op) {
var child = spawn('Xvfb', [':95', '-ac', '-screen', '0', '1600x1200x24'], {
stdio: 'inherit'
});
setTimeout(op(function() {
console.log("Killing Xvfb...")
child.kill();
}),3000);
}
source
share