I’m running the latest Invoice Ninja (v5.5.4 as of this writing) in a docker container on a Synology DS620slim NAS with full SSDs in the RAID and PDF generation takes about 3 seconds. While I’m not complaining about the speed I’ve heard that SnapPDF is capable of generating PDFs much faster (<0.5s). I understand the CPU is kinda outdated in the NAS (Celeron J3355) but I’m wondering if that’s as fast it gets or is there any way to improve the speed?
Clarification: I’m referring to generating PDFs under Quotes. Interestingly, Invoice PDFs load almost instantaneously which makes me think they are already stored as PDF files (and not being converted from HTML —> to PDF on-the-fly).
Addendum: Looking at the console output, the GET requests for displaying both the invoice and quote PDFs seem identical, which makes me wonder why quote PDFs take several times longer to generate.
After the invoice is generated the first time it is not regenerated until it is changed, this could account for the speed differences you are seeing.
3 seconds sounds about right for that quality hardware. We have Enterprise Ryzen’s in production and it can take around 1 second there. You may notice a significant performance boost using our hosted_ninja PDF generator, this sends your HTML to our services for conversion on the fly into PDFs.
Thanks for the quick response, it is much appreciated. I switched to hosted_ninja but I didn’t see any improvements in performance unfortunately so I will stick with SnapPDF.
@ david
Just had a look out of curiosity
Invoices pdf’s are generated only if changes were made, which is expected behaviour.
Quotes, po, recurring and credit pdf’s seem to be regenerated regardless of whether any changes were made or not, every time you view them. Shouldn’t they behave the same as invoices?
I agree with @strider27 , it would be a really nice change in QOL if quotes etc would only regenerate if there have been changes since the last version.
Two additional things I have noticed:
• delivery notes (from invoices) also regenerate on-the-fly
• quotes DO NOT regenerate in the client portal; they load almost instantly in the browser window