Normally generating a PDF does not have to take much time. Are you using datasource microflows in the PDF? Because you could use breakpoints to see what is exactly causing the delays. You could also use the developer tools to see what retrieves are generated and how long those retrieves takes. If the retrieves take to long check if you have set indexes on the right fields.