Aspose slow in conversion with office files

Hello, we are experiencing some cases Aspose conversion from office document to pdf or to images, is extremely slow

I upload a sample file (power point) i found in internet: needs 30 seconds to convert document in png images of slides, 7 seconds to convert in pdf and 4 seconds to convert pdf obtained to images (we tried another library found in internet that converts pdf to images and with that we got images in 1,4 second)

That way as for XLS files - long files, say some worksheets with 90/100 pages each one: not little files that’s true but almost 10 minutes (!) to get image conversion of the pages

For DOC/DOCX file same way: 45/50 pages (only text, no images in it) Aspose can convert doc into pdf in 1,1 second bat pdf to images needs 18 seconds (again a public library to convert pdf to images needs only 2,3 seconds to do same work)

IS a bad use we do of Aspose libraries? We use sample code found in your site or you provide in various post in your forum

We instantiate Aspose This way (example for power point conversion):
m_oDocument = new Aspose.Slides.Presentation(_oInputStream);
m_iPageCount = ((Aspose.Slides.Presentation)m_oDocument).Slides.Count;


then use in methods to convert to image (loop over page count):
Aspose.Slides.ISlide oSlide = ((Aspose.Slides.Presentation)m_oDocument).Slides[_iPageIndex];
System.Drawing.Bitmap oBitmap = oSlide.GetThumbnail((float)m_iResolution / 72, (float)m_iResolution / 72);
oBitmap.Save(_oOutputStream, System.Drawing.Imaging.ImageFormat.Png);


same way to convert entire doc to pdf:
((Aspose.Slides.Presentation)m_oDocument).Save(_oOutputStream, Aspose.Slides.Export.SaveFormat.Pdf);

To convert PDF to images we use:
Aspose.Pdf.Devices.Resolution ResolutionP = new Aspose.Pdf.Devices.Resolution(120);
Aspose.Pdf.Devices.PngDevice PngDeviceP = new Aspose.Pdf.Devices.PngDevice(ResolutionP);
PngDeviceP.Process(((Aspose.Pdf.Document)m_oDocument).Pages[++_iPageIndex], _oOutputStream);


there’s something wrong?
Why this poor performance?

substantially, if there is something you can manage to improve performance, we need a procedure to pass the stream of a pdf (converted from office dos by aspose) and retreive n streams of Png by every page of pdf file, in one unique passage with better performance of today procedure.
Thank you so much.

Hi,

Can you please also attach some DOC/DOCX and Excel files for further analysis?

Best Regards,

I DO attach in my first post.

i attach another zip files (xls and ppt, xls in particular extremely slow)

please let me informed

Hi,

This is not the case with all documents. The performance is different for different documents. For your shared documents, it is on the slower side. We are investigating the issue in detail and will update you soon. Sorry for the inconvenience.

Best Regards,

Yes, i made some test too: it seems Aspose converts in a slower way large documents, power point and excel in particular, and in some cases it is more rapid converting documents as pdf, in other cases is faster converting documents in images.

For instance with Aspose i can convert an Rtf file faster in images range than a pdf, while a DOCX file is faster converting as pdf, OR converting a PNG to PDF is slower (more or less double) with aspose than iTextSharp.
(i tested almost every file types)

So to obtain best results converting documents in pdf + images i need to mix technologies, even if in some cases speed conversion is still very slow in user experience…
Hope you can investigate to improve performances for every kind of origin file

Thank’s a lot

Hi,

The issues for PDF, Cells and Slides have been logged into our issue tracking system as PDFNEWNET-37228, CELLSNET-42845 and SLIDESNET-35537 respectively. We will keep you updated on these issues in this thread. Sorry for the inconvenience.

Best Regards,

Some news about these?
thank’s

Hi Valerio,

We are checking the status of these issues and will update you soon. Sorry for the inconvenience.

Best Regards,

Hi Valerio,

These issues are in analysis phase. We will be able to share the ETA as soon as the investigation is complete. Sorry for the inconvenience.

Best Regards,

Hi,


Regarding your issue “CELLSNET-42845”, please try our latest fix/version: Aspose.Cells for .NET v8.2.2.1
The performance has been improved in it. We evaluated, using your code, it costs about 60s. If in your code, the OnePagePerSheet option has been set, as some sheets have many rows and columns (the sheets have many pages), so consequently converting each sheet to one page will surely cost lots of memory and resources. We checked if the OnePagePerSheet option is not set, it just costs about 16s.

Thank you.

We use OnePagePerSheet option when needed (apply some considerations on cells width when instantiating aspose cells object)…

we tried your 8.2.2.1 dll comparing with 8.2.1.0 in our production system: here’s results of stopwatch… little or no difference

8.2.2.1
00:00:03.4269815 – aspose instance
00:00:00.8303293 – render images from aspose
00:00:03.6406716 – render pdf from aspose (from pdf above)
00:00:00.1114508 – aspose instance pdf
00:00:37.6113291 – render images from aspose pdf

8.2.1.0
00:00:03.3757300 – aspose instance
00:00:00.7971899 – render images from aspose
00:00:03.7664103 – render pdf from aspose
00:00:00.0977251 – aspose instance pdf
00:00:38.0033089 – render images from aspose pdf

Hi,


As we recommended you that you should not set OnePagePerSheet option as it will surely cost more memory and resources (considering the fact that there are lost of pages and contents in the sheet(s)) thus affects the efficiency. Could you skip setting the OnePagePerSheet option and let us know your results.

Thank you.

sorry for delay: we tried your 8.2.2.1 dll comparing with 8.2.1.0 in our production system modified without OnePagePerSheet

8210
00:00:02.6131490 – aspose instance
00:00:29.6148858 – render images from aspose
00:00:03.6864486 – render pdf from aspose
00:00:00.1250322 – aspose instance pdf
00:00:42.9299776 – render images from aspose pdf
8221
00:00:03.4103196 – aspose instance
00:00:27.9336406 – render images from aspose
00:00:03.5576321 – render pdf from aspose
00:00:00.1105969 – aspose instance pdf
00:00:39.0302505 – render images from aspose pdf


some seconds gain, but only 2 or 3 seconds on over 30 seconds total…

If we can suggest, you should work over
OnePagePerSheet option too, because is an option frequently used in real cases (we are using in our production system to grant a render more “user friendly” when it’s possible - we use some considerations in code and when it’s possible to use OnePagePerSheet option, we set it to true).


Hi,


Thanks for sharing the stats/ results and concerns.

We will check if we could enhance OnePagePerSheet option further (if possible). I have logged your comments against your issue “CELLSNET-42845” into our database. Our concerned developer will check and we may get back to you once we have any update on it.

Thank you.

hi no news about CELLSNET-42845?

Hi,


I checked the status of your issue logged earlier as “CELLSNET-42845”. I am afraid, we won’t fix it or we cannot enhance Sheet to Image rendering further with OnePagePerSheet option on (Sometimes it is impossible to render big worksheet having a long list of rows and columns with data to a single paged image). We have already provided the reason in the post in this thread:
https://forum.aspose.com/t/17240

Sorry for any inconvenience caused!