ghostscript - Dramatic speed difference between PDF to PNG vs. PDF to JPEG -
using pdftocairo
, on xeon e5-2630 (2.3ghz) centos 6.3 machine, poppler 0.24, cairo 1.12, libpng 1.2.49, openjpeg 1.3.10 (both centos default), tested converting 37 page pdf convert jpeg , png. ran pdftocairo
no special options (so no alpha channel png, density @ 150ppi). speed difference enormous:
pdf png:
real 0m16.858s user 0m16.552s sys 0m0.154s
that works out 0.43s per page.
pdf jpeg:
real 0m1.762s user 0m1.666s sys 0m0.081s
which is, well, 10 times faster.
now tested using gs convert, same options, , results are:
pdf png:
real 0m16.500s user 0m16.223s sys 0m0.093s
almost identical in speed poppler, strangely.
pdf jpeg:
real 0m7.468s user 0m7.304s sys 0m0.079s
much slower poppler, somehow, included comparison.
why converting png slower? need convert them pngs, there wrong libpng setups? it's curious gs slower when converting jpegs identical pngs.
png compression speed governed zlib compression level , zlib strategy. trade off compression speed compression ratio. compression speed affected lesser degree png filter method, "none" being fastest , "paeth" being slowest. slower commonly-used "adaptive filtering" computes figure of merit each of 5 filter types , selects best each scanline.
Comments
Post a Comment