I am evaluating Aspose.Slides for Java and I am running into massive performance problems.
What I am doing is this:
- open a presentation blank.pptx
- get the second slide
- read an SVG from disk
- import the SVG (via slide.getPresentation().getImages().addFromSvg(svg))
- add a picture frame with the imported image
- set some formatting on the picture frame
- save the modified presentation
When I run this (sample code attached stampSvg.zip), I get these performance numbers:
total time: 54094 ms
- load pptx: 4488 ms
- get slide: 0 ms
- read SVG: 7 ms
- import SVG: 44684 ms
- get image size: 414 ms
- add picture frame: 0 ms
- format picture frame: 0 ms
- save pptx: 4501 ms (583.2 KB)
The troubling lines are:
- load/save: over 4 seconds, Powerpoint loads/saves the presentation in around 1 second.
- import SVG: 44 seconds! Powerpoint inserts the SVG into a slide almost instantaneously.
I used code snippets (for load, save, SVG import) that I found in the Aspose sample code.
Is there a different, faster way to achieve the same result?