Slow performance when rendering a page

We are considering to buy Aspose.Words (.Net),
however we are facing the slow performance when rendering the page as .png or pdf or even when retrieving the page count
the test.docx used is two simple pages and ran on C# .Net 4.5 Windows 8 Core i3 - 4GB RAM Solid state hard drive and it is taking around 2.5-3 seconds for this small docx.
- Time is measured only for the saving not for loading the docx
Any Help Please…
please find the code used

License L = new License();
Stream LicS = File.OpenRead(@"C:\Trials\Aspose.Words.lic");
L.SetLicense(LicS);
Stream stream = File.OpenRead(Loc + @"test.docx");
Document doc = new Document(stream);
stream.Close();
Console.WriteLine("Start Monitoring");
Console.ReadLine();
// Start Measuring Time
DateTime d1 = DateTime.Now;
var opt = new ImageSaveOptions(SaveFormat.Png);
opt.JpegQuality = 100;
opt.Resolution = 96;
opt.PageCount = 1;
opt.PageIndex = 1;
doc.Save(Loc + "test.png");
Console.WriteLine((DateTime.Now - d1).TotalMilliseconds);
Console.ReadLine();

Hi Sameh,

Thanks for your inquiry.

Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.9.0, I am unable to reproduce this problem on my side. The conversion of Docx to Pdf/Png takes less than a second at my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.9.0 and let us know how it goes on your side. I hope, this will help.

Thank you for your quick response,

I was using 13.8 .0 .0 Product version Aug 31, 2013

I downloaded the version you advised 13.9 .0 .0

And Still Slow

please see the attached picture

Hi Sameh,

Thanks for sharing the detail. I have tested again the same scenario at Windows 7, Core i7 - 6GB RAM and conversion of MS Word document to Pdf takes .9 seconds at my side. Please see the attached image for detail.

It is quite difficult to answer such questions because CPU performance and memory usage all depend on complexity and size of the documents you are loading/generating. Usually, Aspose.Words needs 10 times more memory than the original document size to build it’s DOM in the memory and when it comes to rendering a document to fixed page formats (e.g. PDF), Aspose.Words needs to build two model in the memory – one for document and the other for rendered document.

Document.PageCount property also invokes page layout routine which builds the two document models in memory. That is why Aspose.Words utilizes more memory when you render a document than when you simply save a document in flow formats (e.g DOCX). Therefore, memory usage is completely dependent on document size and document complexity. If we can help you with anything else, please feel free to ask.