mileszs/wicked_pdf — pull request #149 by mkelly12 (2012-10-29 22:48:53+00:00)
Title: Fix performance issue for large documents

Rather then using stdin and stdout to interface with wkhtmltopdf, this change uses temp files instead. This fixes performance issues with the newer (>0.9.9) versions of wkhtmltopdf.

Passes test suite and includes a new test to demonstrate the behavior. Without the fix test suite takes ~40 seconds to run, with the fix it only takes ~4 seconds. Tested using wkhtmltopdf 0.11 on OS X.

In our application this fix reduces the generation time of large PDFs from ~5 min. down to ~1 min.