PhantomJS's page.render method support second argument, an options object where it's possible to specify quality:
page.render(imagePath, { quality: 100 });
For PNG quality means compression, and with 100 it generates PNG files the fastest, with least/no compression.
This may speed up PNG generation, as it doesn't compress, but at the same time it may slow it down, as bigger PNG files need to be saved to disk, and disk I/O is slow. Needs benchmarking.
PhantomJS's
page.render
method support second argument, an options object where it's possible to specify quality:For PNG quality means compression, and with
100
it generates PNG files the fastest, with least/no compression.This may speed up PNG generation, as it doesn't compress, but at the same time it may slow it down, as bigger PNG files need to be saved to disk, and disk I/O is slow. Needs benchmarking.