Performance issue: Add text frame inside organization chart node

Hi support,


Below is the code, that creates an organization chart and customize the text frame inside a node.

ISmartArt smartArt = slide.getShapes().addSmartArt(placeholder.getX(), placeholder.getY(), <span style=“font-family: “Courier New”; font-size: x-small;”>placeholder.getWidth(), placeholder.getHeight(), SmartArtLayoutType.OrganizationChart);
<span style=“font-family: “Courier New”; font-size: x-small;”>
ISmartArtNodeCollection nodeCollection = smartArt.getAllNodes();
ISmartArtNode node = nodeCollection.addNode();

long timestamp = System.currentTimeMillis();
ITextFrame textFrame = node.getTextFrame();
System.out.println((System.currentTimeMillis() - <span style=“font-family: “Courier New”; font-size: x-small;”>timestamp ) + " ms");



The last instruction ‘ISmartArtNode.getTextFrame()’ consumes so much time (from 4 to 30s), that is too slow, and make the global operation duration unacceptable if more than 20 nodes (could last more than 10 minutes).

Could you check this and (if possible) optimize the code. I am using Aspose Slide Java version 17.4.

Best regards,
Nordine

Hi Nordine,


I have observed your comments. I like to inform that it looks like there are many complex shapes in presentation. Can you please share source presentation and environment details so that we can further investigate to help you out.

Best Regards,

Hi Ahmad,


Thanks for your quick reply !

Today, I create the most basic environment from the blank presentation, and faced the same performance issue. Seems like the invoke duration exponentially increases when increasing the number of nodes.

Please find the Java code used, the logs, JVM overview and Output presentation.

Best regards,

PS: Please find my machine detail:

OS: Windows 7 Enterprise Service Pack 1
Processor: Intel® Core™ i7-5600U CPU @ 2.60GHz 2.60 GHz
RAM: 12.0 GB
System type: 64-bit

Hi Nordine,

I have observed your comments. A ticket with ID SLIDESJAVA-36399 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

We are sorry for your inconvenience,

Hi Ahmad,


Thanks for adding a bug ticket !

I would like to check with you if it’s possible to fix this issue on the next release. Thanks in advance.

Best regards,

Hi Nordine,

I regret to share that the issue is blocked and unresolved owing to internal issue that needs to be addressed first. Our product team will be scheduling and investigating the issue on its turn and I will really appreciate your patience till the time the issue gets resolved.

Many Thanks,

Hi Mussadir,


Our company product release strongly relies on this impacted feature.

Could you contact the product team to ask when the fix will be released and if possible raise the priority ? This is considered now as urgent !

Thanks,
Nordine

Hi Nordine,

I have verified the issue status from our issue tracking system and as per initial investigation by our product team this issue is blocked owing to missing implementation in Aspose.Slides for .NET. So, this issue will be first resolved in Aspose.Slides for .NET and will then be ported to Aspose.Slides for Java. The issue has just recently been created and I request for your patience till the issue gets resolved by our product team. However, if you ought to expedite the issue resolution then you may consider opting our paid Priority and Enterprise Support Services for expedite resolution of issue.

Many Thanks,

Hi Mudassir and the Community,


I found a workaround for this issue. The idea is to create a cache (or ArrayList in Java) that stores all created chart nodes without getting the text frame. Then once done, you can iterate to each node and add a text. The duration on setting text becomes now instantaneous.

Hi Nordine,

It’s good to know that work around approach has paid on your end in terms of performance. I have shared the information in our issue tracking system as it may be helpful in bringing improvement in API.

Many Thanks,

Hi Nordine,

I am just here to say thank you so much! I was stuck at a similar problem, and adding the texts after creating the org chart more than halved the time it was taking initially! :grinning:

@tanujd_203,

You are very welcome. Please share feedback with us if there is still an issue.

The issues you have found earlier (filed as SLIDESJAVA-36399) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz