corymickelson / CommonPdf

Pdf utility library
16 stars 5 forks source link

PDF signing performance #15

Open moravcik opened 6 years ago

moravcik commented 6 years ago

Probably it is more question about podofo lib ...

The speed is reasonable for small PDFs, but we have tried to sign PDF of size 44 MB (some 157 pages) and it took 2min 30s on local machine and 2min 10s on AWS Lambda.

Signing of the same file with iText Java lib took just a fragment of second, but we would like not to use iText due to its fuzzy licencing and pricing options.

Do you have any observations on performance and/or possible reasons of low performance?

corymickelson commented 6 years ago

@moravcik Sorry to hear of such poor performance, I was not aware. The switch from PdfSigner (also a java lib) to podofo was due to performance issues in PdfSigner. I've been working a little with a native node module binding to podofo. I will try running both against largest PDF, hopefully this will help determine if the issue is due to the nodejs wrapper (CommonPdf) or the underlying library (PoDoFo).

corymickelson commented 6 years ago

@moravcik Can you send me a copy of the pdf. I'm running the signing wrapper on a 31MB PDF 1310 pages and it takes 14 seconds.

corymickelson commented 6 years ago

@moravcik I asked the maintainers of podofo if the could shed some light on this, here is the thread. I will try the last suggestion of using openssl bio stream, but thought you might also be interested in the comments.