Free Support Forum - aspose.com

GroupShapeEx navigate trough

Hi All,

I really need your help guys to solve an issue related to GroupShapeEx object. I am refactoring some existing code that couse quite often an OutOfMemory error . The Code is suppose to split a PPTX in slides and create a single PPTX with every slides having the same shapes and layouts.
At the moment i have this code that consume most of the memory :

private ShapeEx copyRecursivePropertiesToShape(final ShapeEx shape) {
ShapeEx result = null;

if(shape instanceof GroupShapeEx){

GroupShapeEx grpShape = (GroupShapeEx)shape;

Iterator shapes = grpShape.getShapes().iterator();

while (shapes.hasNext()){
ShapeEx childShape = shapes.next();
result = copyRecursivePropertiesToShape(childShape);
}
}else
{
result = shape;
}
return result;
}

The question is about , if there is an alternative to navigate trough GroupShapeEx and discover all the leaves avoiding recursion.

Thanks

Angelo.



Hi Angelo,


I have observed the problem statement shared by you and in fact you have pointed to multiple issues in same post. For OutofMemory Exception issue, please share the source presentation and sample code snippet that I may use to reproduce on my end. Secondly, for performance related issue pointed by you, I request you to please share the complete platform, Java and environment details along with statistics to observe the issue on my end. I also request you to please share the sample data to reproduce the issue on my end. Please try using Aspose.Slides for Java 7.1.0 on your end as well to observe the OutofMemory or performance related issues.

Secondly, the group shapes have collection of shapes inside them and the only way available is the one that you have shared in your post.

Many Thanks,