Skip to main content
Participating Frequently
May 11, 2021
Question

Adobe Document Services performance issues

  • May 11, 2021
  • 1 reply
  • 1552 views

Hi all,

 

I'm exploring Adobe Document Services as a template based option for generating PDF reports. So far, I've been very happy with the template creation plugin and how it all comes together with 

Adobe.DocumentServices.PDFTools.
 
The main obstacle I've noticed is that the call to 

 

 

documentMergeOperation.Execute(executionContext);

 

 

is taking 5-10 seconds when executed from an extremely light .NET core console application. I wouldn't consider the DTO for this report to be complex enough to merit the execution time: 3 nested objects, 1 image base 64 encoded, 1 collection with 3 elements, and a dozen more string/DateTime properties. The template is basically just a single page with mostly text tags, 1 image, and a table.

 

Our .NET Core application is running document services from an installed package, rather than through Adobe Cloud Services. We are not able to send our DTOs to ACS due to security requirements. Currently, we run documentMergeOperation.Execute on a single DTO + template (we're in the proof of concept stage). I'm planning to explore runtime on different DTO's, templates, and # of reports produced, but haven't yet.

 

I'm assuming that Execute awaits credential verification via web request, and maybe that's where some of this long runtime is coming from. I don't see any way to cache or re-use this verification between requests, but maybe that happens automatically under the API's hood.

 

Has anyone else dealt with runtime issues around the Document Services API? Does anyone have any suggestions for how we might improve runtime? 5-10 seconds runtime per doc will make scaling a PDF generation service difficult.

 

I appreciate any help or similar experiences!

Max

This topic has been closed for replies.

1 reply

Joel Geraci
Community Expert
Community Expert
May 11, 2021

Creating a PDF file from Word running on a local machine can take that long. Just to verify that it's the PDF creation from the final Word file rather than the merge that's taking the time, try setting the output to .docx and see if the time is reduced. Please let me know your results.

Max SegAuthor
Participating Frequently
May 13, 2021

Thanks for the suggestion Joel!

 

I've got two reports now and they both generate in roughly the same time. Both reports are based on docx templates but have significant differences in content. Both reports generate to PDF in about 8 seconds and docx in 3 seconds, so I think that lends to your theory. Generation time seems to be pretty consistent between runs, but I haven't dug into programmatic benchmarking yet.

Joel Geraci
Community Expert
Community Expert
May 13, 2021

Ok - Thanks for confirming. The PDF creation service does a lot more than just render the PDF. It adds bookmarks based on Word styles, adds structure tags for accessibility, reuse, and table extraction, subsets fonts, and optimizes the file for faster web viewing, and more. These are non-trivial and process-intensive tasks but you get a better PDF as output.