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

50% slower than pdf2cairo. Anything tweakable? #4

Open
msageryd opened this issue Sep 18, 2023 · 1 comment
Open

50% slower than pdf2cairo. Anything tweakable? #4

msageryd opened this issue Sep 18, 2023 · 1 comment

Comments

@msageryd
Copy link

Thank you soo much for your work with this. I'm regularly rendering PDF pages to jpg/png and I'm always on the hunt for better/faster/nicer tools.

The only OSS tool I have found to render consistent and nice JPG files from PDFs with vector graphics (CAD drawings) is pdf2cairo from poppler-utils.

I'm already using sharp for other tasks, so I was thrilled to find your wrapper for pdfium and that you sugges sharp as well.

Your library seems to work very well after some testing, but it is about 50% slower than pdf2cairo. Do you think that this speed difference is due to pdfium being slower than pdf2cairo or maybe pdfium does a better job with some PDFs?

@hyzyla
Copy link
Owner

hyzyla commented Sep 18, 2023

Under the hood this library uses pdfium (developed by Chrome team) compiled to wasm. And wasm version definetly can be slower than native version. In theory pdfium should faster than poppler. Also keep in mind that this library uses blocking calls, so if you are trying concurrently test peformance, it can lead to wrong results

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

2 participants