Rank: Newbie Groups: Member
Joined: 12/6/2012 Posts: 2
|
Hi
I've recently made use of the HTML => PDF lib and for the most part it's working beautifully, just wondered if there was a way to improve the speed.
I'm generating a 3 page PDF, as you would expect the fist execution of the generation takes much longer ~ 8 seconds due to the CLR & JIT compilation.
However, once the first PDF has been generated it's takes on average over 3.5 seconds to be generated. That's over 1 second per page!
I understood that you're making use of the WebKit engine to handle the rendering of the HTML.
If you are using the webkit engine. I would suggest the lagg is being caused, in part, by the initialisation of the webkit engine.
Is there any possibility for creating a service that initialises the engine once so that it can be re-used. Much the same as a browser has to do.
Take chrome/safari the initial load of the browser is relatively slow, webkit developers suggest this is caused by the initialisation of the webkit engine. When a URL is opened in new tab, or JavaScript is used to open a new tab & inject HTML into there's no lagg what so ever.
Many thanks Andy
ETA : All of the URLs used in the PDFs are local resources using - a file:// URI
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Certainly you can do that. You can just call the converter once with an empty string to initialize the engine and then it will be much faster afterwards.
Thanks!
|