|
Rank: Newbie Groups: Member
Joined: 4/1/2014 Posts: 4
|
We've been using EO PDF for a while now. Recently we ran into performance issues while converting bigger HTML pages into PDF. If we look into the IIS log files, we see that it takes EO.PDF around 250ms per each MB it reads. If we make the HTML file bigger, time grows linear. If we make the file smaller, time shrinks. It doesn't matter what is in the file, an big HTML comment will take as long as something else.
The time mentioned is not the 'ASP.Net' response time, we measure that seperately. It seems to us that it is the EO.PDF 'download' time.
Is there a limit to the throughput of EO.PDF? 250KB per second doesn't seem very high...
If so, can we influence the throughput through configuration and/or code?
EO.PDF is running locally, network does not seem to be an issue as we measure all times on IIS log level directly.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
there isn't a fixed relationship between the HTML file size and the time it uses to convert. It depends on a lot of factors. For example, a HTML file with a lot of pictures will definitely converts slower than a HTML file with just text. However a text HTML file with a lot of tables will definitely be slower than one with just plain text paragraphs. So I would recommend you to try to reduce the complexity of the HTML file and see if it helps. Unfortunately the converter does not have any configuration options on this regard.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/1/2014 Posts: 4
|
I am afraid that is not the case. What we did is: - we created a HTML file with only 1 comment in it with 1.6MB of text in it - we started the sample Basic application - pressed "Convert" - and looked in the IIS log file. - download time = 4,8 sec
After that, we did the following: - opened the same html file using a Chrome browser - looked into the IIS log - download time = 0,2 sec
After that, we downloaded Evo.pdf: - started their sample app - selected the same html file - pressed convert - looked into the IIS log - download time = 0,2 sec
So it is not about the conversion, the problem already happens opening the file...
I really hope you have a solution, because we really have a huge problem with this.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Can you tell us what you meant by "sample Basic application", and "download time", and how a local HTML file is related to your IIS?
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/1/2014 Posts: 4
|
- sample basic application: the sample application in your installation package (installDir\Essential Objects\EO.Total 2013\Samples\Pdf\EOPdfDemo\CS\EOPDFDemo_VS2010_12_13_CS.csproj) - download time: IIS processing time - IIS was installed locally
Our configuration, and steps to reproduce: - local IIS server installation, with a html file "pdftest.html" in the root, which consist of a html file with one 1 html comment tag (<!-- xxx -->) with 1.6 MB of random text - we installed EO.Total 2013 - we opened the sample application "installDir\Essential Objects\EO.Total 2013\Samples\Pdf\EOPdfDemo\CS\EOPDFDemo_VS2010_12_13_CS.csproj" - opened the form "All demos -> Html to Pdf -> Basic -> Convert Url" - In the form, we have chosen the url "http://localhost/pdftest.html" - in the IIS-log file, we looked at the IIS processing time: 4.6 seconds
and again, with both Chrome and with competitor Evo.pdf, the IIS processing time is 0,2 seconds. So it seems like that there is something wrong with EO.pdf reading the file...
Conversion is fast, that is not the problem, it really is the reading of the file.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Ah...I see. very interesting observation. This has never been brought to our attention before since for most people the network speed is the deciding factor which obviously is out of our hand, so our focus has always been the conversion speed. As such when you first post the question we thought it was about the conversion speed, now we see what you were really referring to. We will look into this and see what we can find.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 4/1/2014 Posts: 4
|
Hi guys, based on the information you gave us in PM we have found the solution! Instead of using ConvertUrl(), we use ConvertHTML() and get the HTML string via a WebClient:
.... var proxy = WebRequest.GetSystemWebProxy(); .... using (WebClient client = new WebClient()) { client.Proxy = proxy; byte[] arr = client.DownloadData(url); var str = System.Text.Encoding.Default.GetString(arr); HtmlToPdf.ConvertHtml(str, outputFileName); }
We have a very fast conversion and the HTML loads fast as well... The slowness was in the Proxy call, it looks like the ConvertUrl() method initiates the Proxy each time.
Anyway, thanks for helping us out!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Ah.....that makes sense. Thank you very much for such valuable feedback. We really appreciate it!
|
|