camlpdf icon indicating copy to clipboard operation
camlpdf copied to clipboard

Faster loading of basic data on large files

Open johnwhitington opened this issue 7 months ago • 2 comments

Whilst cpdf is generally fast, we are behind on simple operations on large files - perhaps by not delaying the reading of objects from object streams in some way?

Times for Forgotten_creator:

CPDF: 0.39s
QPDF: 0.04s
MUPDF: 0.17s
XPDF: 0.42s

cpdf -pages in.pdf
qpdf -show-npages in.pdf
mutool pages in.pdf
pdfinfo -box in.pdf


Times for all files in PDFTests/

CPDF:  1.36s
QPDF:  0.94s
MUPDF: 0.47s
XPDF: 0.66s

time find . -maxdepth 1 -type f -exec cpdf -pages {} \; > foo 2>&1
time find . -maxdepth 1 -type f -exec qpdf -show-npages {} \; > foo 2>&1
time find . -maxdepth 1 -type f -exec mutool pages {} \; > foo 2>&1
time find . -maxdepth 1 -type f -exec pdfinfo -box {} \; > foo 2>&1

johnwhitington avatar Jan 09 '24 20:01 johnwhitington