We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

First PDF generation in 19.1 and later is slower than in 14.0

We are currently working with version Aspose.Words 14.1.0 net2.0 with a valid license. Creating a PDF document using Aspose takes a long time. It sometimes takes 6.7 seconds to create a PDF. We researched why it takes so long: not only the required fonts are read into Aspose’s cache, but all fonts installed on the computer. The above behavior only occurs when we generate a PDF file for a DOC/DOCX document for the 1st time. If we perform the same action for the same DOC/DOCX document again, this action takes only about 0.02 seconds. Only the required fonts are fetched from the cache, because all fonts have already been read into the cache.

Then we performed an UpdatePageLayout on an empty Aspose.Word.Document and performed the same actions for the same document again. First PDF generation took 4.7 seconds and 2nd and further 0.2 seconds.

Then we wrote text with all installed fonts to an empty Aspose document and performed the same actions for the same document again. First PDF generation took 4.1 seconds and 2nd and further 0.2 seconds.

Without time improvements, we upgraded our Aspose.Words to later versions and performed the same time measurements again.

We have tried versions 16.2, 16.3, 19.1, 20.08, 20.11.

We see that in 16.2 and 16.3 the time used for the first PDF generation for the same document remains about the same as in 14.0.

In 16.2 we have used new PdfSaveOptions {MetafileRenderingOptions = {EmfPlusDualRenderingMode = EmfPlusDualRenderingMode.Emf, EmulateRasterOperations = false,RenderingMode = MetafileRenderingMode.Vector}, SaveFormat = SaveFormat.Pdf}. Still there is no improvement.

We also see in 19.1, 20.08, 20.11 the time used for the first PDF generation for the same document keeps increasing.

For example in 19.1 our time measurements are:

  • Without any action on beforehand: first PDF generation takes 7.365 secs
  • With UpdatePageLayout() on empty docoment on beforehand: first PDF generation takes 5.695 secs
  • With using all fonts to write to an empty document on beforehand: first PDF generation takes 3.771 secs

What makes the first PDF generation a lot slower in 19.1 (and later) compared to 14.0 ?

We appreciate your swift response to this performance issue.

@wau1977,

To investigate this problem, we have logged a ticket in our issue tracking system with ID WORDSNET-21492. We will keep you updated here on the status of linked issue and apologize for any inconvenience.

@wauwau,

Please compress the following resources into ZIP format and attach the .zip file here to be able to reproduce this performance issue on our end:

  • A simplified source Word document (you’re getting this problem with)
  • Please also create a standalone simplified Console Application (source code without compilation errors) that helps us to reproduce this problem on our end and attach it here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size.