Free Support Forum - groupdocs.com

Taking approximately 22-24 seconds to render html content (PDFwith 46 pages) in viewer

Hi,


We are sampling PDF of 46 pages as an input to viewer. Its taking almost 22 seconds to render html content in viewer.

Is there any way to improve the performance of groupdocs viewer? our requirement has documents with more than 100 pages in some instances, what will happen to groupdocs viewer in this circumstances?

Please suggest.

Thanks,
Prem Kumar

Hi Prem,


Thanks for sharing your concerns. Please provide us following details:
  • Which version of the API you are using?
  • Are you using any of our showcase project?
  • Can you please share problematic PDF file with us?
We’ll appreciate your cooperation.

Best regards

Hi Atir,


Thanks for your reply.

We are using groupdocs viewer 3.7.0. Its taking almost 20 to 37 seconds for converting to html page objects.

viewerHtmlHandler.getPages(filename): 37.494325201 seconds

Also attached pdf document for reference.

Please advise us.

Thanks,
Prem Kumar

Hi Prem,


Thanks for sharing the details.
Let us elaborate you in what circumstances you can increase document rendering performance. API performance depends on content of the documents. Documents differ with each other with respect to the content they posses like there can be tables/charts/images etc.
So, viewer may take some time to render a document for the first time. However, if you enable cache true as follows:
config.setUseCache(true);
You can see change in the response time of any large document’s rendering process. Attached is the snapshot of rendering html output and time comparison.
Hope it’ll help.

Kind regards

Hi Atir,


Thanks.

Yes it improved the response time, now its reading htmls from cache (temp) instead of making viewer api calls.

Regards,
Prem Kumar

Hi Prem,


You are welcome.
Yes, that’s the purpose of cache system. So that viewer must not consume a lot of time in rendering a new large file every time. Once a file/document is cached, it’d be read/rendered from cache, that saves time.
Consider a large document with 1000+ pages. Rendering it every time by disabling cache will consume a lot of time and system resources, eventually it will effect viewer’s performance (time based). Hence, we’d recommend you to keep cache enabled.

Have a nice weekend ahead.
Many thanks