cups-filters
cups-filters copied to clipboard
Ghostscript processing of pdf is much slower after pdftopdf
Describe the bug
Conversion of PDF to PostScript is much slower with pdftopdf-processed file compared to the original file: 1.2 seconds vs 10 seconds on a low end Cortex-A7 device.
Default CUPS test page, original:
# time /usr/bin/gs -dNumRenderingThreads=2 -dMaxBitmap=100m -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS -sstdout=%stderr -sDEVICE=ps2write -dShowAcroForm -sOUTPUTFILE=%stdout -sProcessColorModel=DeviceGray -sColorConversionStrategy=Gray -dLanguageLevel=3 -r600 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE /usr/share/cups/data/default-testpage.pdf > /dev/null
real 0m1.275s
user 0m1.200s
sys 0m0.060s
Default CUPS test page, processed:
# time PPD=/etc/cups/ppd/MF3010.ppd /usr/lib/cups/filter/pdftopdf 0 0 0 0 0 < /usr/share/cups/data/default-testpage.pdf > /tmp/page_manual
DEBUG: pdftopdf: No FINAL_CONTENT_TYPE environment variable, could not determine whether to log pages or not, so turned off page logging.
DEBUG: pdftopdf: Last filter determined by the PPD: None; FINAL_CONTENT_TYPE: (null) => pdftopdf will not log pages in page_log.
DEBUG: PDF interactive form and annotation flattening done via QPDF
DEBUG: pdftopdf: "print-scaling" IPP attribute: auto
DEBUG: pdftopdf: Print scaling mode: Do not scale, center, crop if needed
After Cropping: 595.275574 841.889771 595.299988 841.900024
real 0m0.350s
user 0m0.240s
sys 0m0.030s
root@uowprint:~# time /usr/bin/gs -dNumRenderingThreads=2 -dMaxBitmap=100m -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS -sstdout=%stderr -sDEVICE=ps2write -dShowAcroForm -sOUTPUTFILE=%stdout -sProcessColorModel=DeviceGray -sColorConversionStrategy=Gray -dLanguageLevel=3 -r600 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE /tmp/page_manual > /dev/null
real 0m10.415s
user 0m9.960s
sys 0m0.410s
To Reproduce Steps to reproduce the behavior:
- Repeat the commands above to compare processing speed
Expected behavior No significant processing speed changes
System Information:
- OS: Debian 12
- Version: Ghostscript 10.0.0~dfsg-11+deb12u3, cups 2.4.2-3+deb12u5, cups-filters 1.28.17-3