Way too slow if many data points in a slide

Hi,

I’m having a real big issue with Aspose Slides Java.
I’m mostly using it to split presentations and generate slide thumbnails. One of my potential customers tried with a specifically data-heavy slide, and it’s just completely breaking my server. 300% CPU for 20 minutes to take a thumbnail, this is just impossible.

You can find the slide here : Dropbox - File Deleted - Simplify your life

I’ve tried sending it to https://www.convertapi.com/pptx-to-jpg which I used before switching to Aspose for thumbnails, and they give me the JPG back in less than 15 seconds.

What’s wrong with Aspose regarding slides with a lot of shapes ? Are you planning on improving performance ? Is there anything I can do do make it usable ? (I need 20 seconds of processing per slide MAX if it’s big)

Thanks !

@alb1

It seems to be an issue with API while rendering slide thumbnail. I have tried on my end as well and it took more than 20 minuets with no results. A ticket with ID SLIDESJAVA-38459 has been created to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Thanks ! I said 20 minutes because it was still running, but I let it run with a 3h timeout and it timed out…
The issue also happen for splitting this specific slide to another presentation. Please try this as well, there’s the same behavior : 400% CPU for hours, and it never gives a result back.

This is quite urgent on our side as it’s completely blocking the product we’re building with aspose, so keep me posted.

Thanks a lot!

Hi,

Here are other slides that create the issue so you can have more substance to debug : Dropbox - File Deleted - Simplify your life

The second one should also spin in a loop.

Thanks

On my end, I observed the infinite rendering time and CPU usage of 99% with top RAM consumption of 1 GB. But rendering process was never completed.

I have also added this presentation deck to associated ticket for resolution.

1 Like

To be able to keep processing slides before you guys fix this issue, I’m trying to cancel slides processing if there are too many shapes in it, but looks like the graph is one shape so that doesn’t work.

In the meantime, any idea how I could detect that this slide won’t be able to be saved because of too much data in the graph ? (if the issue it’s due to the graph of course)

@alb1

There is no way possible to detect whether a slide would be saved or not. Its only when you try to render it and you fail then you get to know the issue. I hope this issue will be fixed soon and request for your patience in this regard.

@alb1,
Thank you for the issue description. Our development team is already working on the performance problem in such cases.

I would suggest you to try interruption of long-running tasks.
More details: InterruptionToken

@alb1,
In your case, interruption of the long-running task can be done as follows:

final InterruptionTokenSource tokenSource = new InterruptionTokenSource();

Runnable thumbnailRendering = new Runnable()
{
    public void run()
    {
        LoadOptions loadOptions = new LoadOptions();
        loadOptions.setInterruptionToken(tokenSource.getToken());

        Presentation presentation = new Presentation(dataPath + "problematic-slide.pptx", loadOptions);
        try
        {
            BufferedImage image = presentation.getSlides().get_Item(0).getThumbnail(1, 1);
            File file = new File(dataPath + "thumbnail.jpg");
            ImageIO.write(image, "jpg", file);
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        finally
        {
            presentation.dispose();
        }
    }
};

Thread thread = new Thread(thumbnailRendering);
thread.start();
Thread.sleep(20000);
tokenSource.interrupt();

Hi, if this can help with the investigation, this is another slide that gives the same behavior. The slide with the excel spreadsheet included : Dropbox - File Deleted - Simplify your life

I believe I didn’t have any issues splitting it before (I wasn’t using the getThumbnail function back then so I can’t tell)

Do you have any idea how long this could take to fix ? This is a complete blocker for our product.
Thanks a lot !

@alb1,
Thank you for the presentation sample.

Could you share a code snippet that causes the problem, please?

I made a few more tests on this last one and I can’t always reproduce the issue. I’ll come back to you with details, but for now let’s not take the last link into account in the investigation. Thanks !

@alb1,
Sure, you are welcome.

Hi,

Really sorry to bother, but this is a complete blocker for us and the entire project is on standby because of this issue. Do you guys have any idea how long it could take to release a fix ?

Thanks a lot !

@alb1,
The fix is planned to release in Aspose.Slides 21.2. Thank you for your patience.

1 Like

The issues you have found earlier (filed as SLIDESJAVA-38459) have been fixed in this update.

1 Like