dompdf is a converter, which is slightly different than a native PDF compiler, and on it's code page: https://code.google.com/p/dompdf/ it lists some limitations right on the front:
- not particularly tolerant to poorly-formed HTML input (using Tidy first may help).
- large files or large tables can take a while to render
- CSS float is not supported (but is in the works).
Have you thought about alternatives, like TCPDF, instead of dompdf?
This thread could possibly be of use in your consideration:
Thank you Mike.
We tried TCPDF also but still with that PDF generation is slow for large data.
Then we tried increasing the Memory size via PHP.ini file.
Now it appears to be more faster.
Following the recommendations above, running Tidy on your page before rendering to PDF could help:
Also, limiting the amount of CSS and other code (minimalistic approach) might help.