Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster loading of basic data on large files #66

Open
johnwhitington opened this issue Jan 9, 2024 · 2 comments
Open

Faster loading of basic data on large files #66

johnwhitington opened this issue Jan 9, 2024 · 2 comments

Comments

@johnwhitington
Copy link
Owner

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
Copy link
Owner Author

johnwhitington commented Jan 13, 2024

+monster_squeezed -pages:

cpdf 10.49s
qpdf 1.22s
mupdf 2.14s
pdfinfo 0.53s

And on full read and write:

cpdf 6m6s
qpdf 1m9s

@johnwhitington
Copy link
Owner Author

johnwhitington commented Jan 13, 2024

Now:

Times for Forgotten_creator:

CPDF: 0.13s
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
But still slower on:

Times for all files in PDFTests/

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant