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

Free Support Forum - aspose.com

First run performance on web


I am developing a sort of web application, which runs on Sharepoint, therefore GAC; that converts documents to PDF as a basic feature using Aspose. This convertion are done via a handler(ASHX).

The problem is that the first time the application runs(like after GAC deployment) it takes quite some time to convert a simple file. This doesn’t happen just once though, but rather every time a different product is used. Let me give you a concrete scenario. File sizes are pretty much the same.
These happen sequentially:

file.doc (about 8 seconds)
file2.doc (1 second)
file3.doc (1 second) and so on
file.ppt (about 8 seconds)
file2.ppt (about 1 second) and same scenario
same scenario with aspose.cells, aspose.diagram etc.

I have tried to create a dummy instance of document/worksheet/etc. for each product when the application is first deployed; and even converting them to PDF into a dummy stream. However, it only saved a couple of seconds.

It is a bit trivial issue, but it would be good to get rid of. How can I avoid this?


Hi Natan,

Thanks for your inquiry.

I am a technical support person for Aspose.Words. In Aspose.Words I suppose such a once off delay may be caused by the loading of fonts and other resources. You can try precaching these by creating a new Document and calling UpdateFields and UpdatePageLayout.

Please let me know if this helps. Regarding the other products, the support developers from those teams will answer shortly.


Hi Adam,

Yes, that affected the result significantly though not as much as converting another document first. However, it is good enough. Thank you.

I looked for similar methods to do the same on other products, yet I have failed. I’ll be waiting for those.


Hello again,

Is there any update on this issue? I’m still waiting for the cache tweaks on other products.

Hi Natan,

Regarding Excel spreadsheets rendering (by using Aspose.Cells component), you may precache using the following sample code, e.g

Workbook workbook = new Workbook();
using(MemoryStream ms = new MemoryStream())
workbook.Save(ms, SaveFormat.Pdf);

Thank you.

Hi Natan,

Regarding .PPT and .PPTX rendering (by using Aspose.Slides for .NET component), you may precache using the following sample code, e.g

var ppt = new Presentation();
var sldppt = ppt.Slides[0];
using (MemoryStream msppt = new MemoryStream())
ppt.Save(msppt, SaveFormat.Pdf);

var pptx = new PresentationEx();
var sldpptx = pptx.Slides[0];
using (MemoryStream mspptx = new MemoryStream())
pptx.Save(mspptx, SaveFormat.Pdf);

Thank you.

Hi Natan,

You can use the following code for Visio diagrams.

Diagram diagram = new Diagram();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

PdfSaveOptions options = new PdfSaveOptions();

options.SaveFormat = SaveFileFormat.PDF;

using (MemoryStream ms = new MemoryStream())


diagram.Save(ms, options);


Best Regards,