Welcome Guest Search | Active Topics | Sign In | Register

HtmlToPdf.ConvertHtml() Performance Options
Quickline AG
Posted: Wednesday, July 5, 2017 9:43:35 AM
Rank: Newbie
Groups: Member

Joined: 10/24/2016
Posts: 2
Hi,
we've got some Performance-Issues.

Sample-Code:
https://github.com/rsauter/eopdf-for-dotnet-prototype/blob/master/EOPoc/Program.cs

The call for HtmlToPdf.ConvertHtml() lasts about 2000-2500ms. There are no complex HTML-Elements in the DOM.
When we consume the method on a Server (Document with HTML and Picture) it lasts about 3600ms.

I saw any issues in supportforum according to the GPU. Does a solution exists to optimize the call in cases on VM's (Server)?
Or are there other optimization opportunities?

Lirary Versions are:
EO.Base 17.0.31.0
EO.PDF 17.0.31.0
EO.Web 17.0.31.0
EO.WebBroser 17.0.31.0
EO.WebEngine 17.0.31.0

I don't kow if you need more informations. Don't hesitate to ask.

Best regards
Roger



eo_support
Posted: Wednesday, July 5, 2017 9:51:36 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

We tested your code here and the result seems to be normal. In our test the first run takes 2363ms, however the second and the third run only takes 404 and 410ms respectively.

It is normal for the first run to take significant longer because it must initialize the conversion engine. However once the engine is initialized, subsequent conversion will be much faster.

Thanks!
Quickline AG
Posted: Monday, July 10, 2017 1:41:53 AM
Rank: Newbie
Groups: Member

Joined: 10/24/2016
Posts: 2
Hi,

ok, thank you for your hint! But, is there a way to keep the engine alive in a web-application (webservice)?
eo_support
Posted: Monday, July 10, 2017 9:54:37 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,225
Hi,

The engine will automatically shuts down when it stays idle for a while. So you can use a timer to periodically calls something like HtmlToPdf.ConvertHtml(string.Empty, new PdfDocument()) to keep it alive. However IIS also recycles your web application, so when that happens, the engine will be shutdown since it can not out live your application.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.