We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ASPOSE.SLIDES JAVA 15.6.0 is consuming lot of memory

Hi,


We have a test suite which has testcases for our API’s which uses Aspose.Slides API extensively.
This test suite was consuming 1.536 MB with version Aspose.Slides Java 15.3.0 and its consuming 2.7 GB with version Aspose.Slides Java 15.6.0.

In order to investigate further, we tried following test case which is just loading and saving the PowerPoint presentation.

public class TestMemory{

Memory memory=new Memory();

public void testMemoryUsage() {
long usedMemory = 0;

memory.baseline();
Presentation pres =new Presentation (“LloydsFinancialResultspresentation2004.pptx”);
usedMemory = memory.checkUsage();

System.out.println("15.6.0 Memory Used in loading: " + usedMemory);

memory.baseline();
pres.save(“LloydsSaved.pptx”, SaveFormat.Pptx);
usedMemory = memory.checkUsage();

System.out.println("15.6.0 Memory Used in Saving " + usedMemory);
}
}

public class Memory {
private static final int NUM_TIMES_TO_RUN_GC = 30;
private static final long INITIAL_BASELINE_VALUE = -1L;

private long baseline = INITIAL_BASELINE_VALUE;


public void baseline() {
baseline = runCheck(NUM_TIMES_TO_RUN_GC);
}


public long checkUsage() {
Validate.isTrue(baseline >= 0, “Please make suer Memory.baseline() is called first!”);

// Calculate the difference
final long usage = runCheck(NUM_TIMES_TO_RUN_GC) - baseline;

// Initialize the baseline.
baseline = INITIAL_BASELINE_VALUE;
return usage;
}

private long runCheck(int numGcs) {

for (int times = 0; times < numGcs; times++) {
System.gc();
}

long freeMemory = 0;
long totalMemory = 0;


for (int count = 0; count < 4; count++) {
freeMemory = Runtime.getRuntime().freeMemory();
totalMemory = Runtime.getRuntime().totalMemory();
}
return totalMemory - freeMemory;
}
}

We tried above code with both the versions Aspose.Slides Java 15.3.0 and Aspose.Slides.Java 15.6.0 and got following result.

15.6 is using 75 MB(approximate) memory more for loading this presentation when compared to 15.3.0.

Infact, for some PowerPoint presentations, 15.6.0 is using 100MB more than 15.3.0 just for loading the PowerPoint.

Sample PowerPoint presentation attached with this post.

Please consider it a high priority issue and kindly look into this as soon as possible.

Thanks
Manisha



Hi Manisha,


Thank you for your interest in Aspose.Slides.

I have observed your comments and worked with the file shared by you. I have observed different results as compared to the observations shared by you. Please share with us the environment details on your end so that we may investigate it further on our end to help you out.

Best Regards,

It’s Oracle Linux 5 (Intel 64-bit).

Hi Manisha,


Thank you for sharing the details about your operating system. I request you to please share with us a sample application instead of sharing the code. I request you to also share with us your JDK details because we need to test it exactly as in your environment. Please share the requested data and information so that I may investigate it further to help you out.

Best Regards,

Hi,

Sorry, we can not share our sample application with you.

The JDK details are given below :

java version "1.7.0_72"
Java™ SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot™ 64-Bit Server VM (build 24.72-b04, mixed mode)


I came across one more post at Aspose forum which reported high memory consumption.
Memory Usage (Again)


I want you to monitor the memory consumption in Aspose Slides Java 15.6.0 version.
You can also compare the memory consumption with Aspose Slides Java previous version.

Thanks
Manisha

Hi Manisha,


Thank you for sharing the details.

We are investigating the issue as per the environment details shared by you. We will get back to you with our findings soon. We appreciate your patience in this regard.

Best Regards,


Hi Manisha,


I have worked with the sample code and file shared by you. I have been able to observe the problem. A ticket with ID SLIDESJAVA-34977 has been logged into our issue management system for further investigation and resolution. This thread has been linked with the issue so that you may be automatically notified as soon as the issue will be fixed.

We are sorry for your inconvenience,

Hi Manisha,


We have been working on the issue reported by you and we request you to please try using Aspose.Slides for Java 15.7.0 on your side and then share your kind feedback with us. I have attached the snip of results on our side for your kind reference.

Please let us know if the issue persists. We will be happy to assist you further.

Best Regards,

Hi,


Could you please share the memory consumption statistics with Aspose.Slides.Java 15.6.0? Also share the environment where you are running this code.

Our memory statistics are given below:

15.3.0 Memory Used in loading: 98488472
15.3.0 Memory Used in Saving -1661728
15.6.0 Memory Used in loading: 173740688
15.6.0 Memory Used in Saving 547336

Environment: Oracle Linux 5 (Intel 64-bit).
The JDK details are given below :
java version "1.7.0_72"
Java™ SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot™ 64-Bit Server VM (build 24.72-b04, mixed mode)
                                </blockquote></blockquote></blockquote></blockquote>According to the statistics shared by you, it seems that Aspose.Slides.Java 15.7 is taking more memory than Aspose.Slides.Java 15.6.<br>As per the memory snapshot shared by you, Aspose.Slides.Java<b> 15.7</b> is taking <br><b>239.824152 MB </b>to load the sample presentation, on the other hand, as per our findings Aspose.Slides.Java <b>15.6</b> is taking <b>173.740688 MB</b> to load same sample presentation.<br>From this, it seems that Aspose.Slides.Java 15.7 is consuming 66MB more than Aspose.Slides.Java 15.6.<br><br><br>Thanks<br>Manisha<br><br>

Hi,


Could you please share the memory consumption statistics with Aspose.Slides.Java 15.6.0? Also share the environment where you are running this code.

Our memory statistics are given below:

15.3.0 Memory Used in loading: 98488472
15.3.0 Memory Used in Saving -1661728
15.6.0 Memory Used in loading: 173740688
15.6.0 Memory Used in Saving 547336

Environment: Oracle Linux 5 (Intel 64-bit)
java version "1.7.0_72
Java™ SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot™ 64-Bit Server VM (build 24.72-b04, mixed mode)
                                </blockquote>According to the statistics shared by you, it seems that Aspose.Slides.Java 15.7 is taking more memory than Aspose.Slides.Java 15.6.<br>As per the memory snapshot shared by you, Aspose.Slides.Java<b> 15.7</b> is taking <br><b>239.824152 MB </b>to load the sample presentation, on the other hand, as per our findings Aspose.Slides.Java <b>15.6</b> is taking <b>173.740688 MB</b> to load same sample presentation.<br>From this, it seems that Aspose.Slides.Java 15.7 is consuming 66MB more than Aspose.Slides.Java 15.6.<br><br><br>Thanks<br>Manisha<br><br>

Hi Manisha,


I have observed your comments and like to share with you the statistics on our end. Please find attached the images with this post. We have tested it in Red Hat Enterprise Linux and found Aspose.Slides for Java is performing better than Aspose.Slides for Java 15.6.0. You may share the statistics with us if you are not yet satisfied with the performance as we are trying to continually improve the performance with the release of every version.

Please let us know if the issue persists. We will be happy to assist you further.

Best Regards,

Hi,


I tested memory consumption on my machine with different versions of Aspose Slides Java 15.3.0 , 15.6.0 and 15.7.0 and got following results:


5.3.0 Memory Used in loading: 98.488472 MB
15.3.0 Memory Used in Saving -1661728

15.6.0 Memory Used in loading: 173.740688 MB
15.6.0 Memory Used in Saving 547336

15.7.0 Memory Used in loading: 155.403520 MB
15.7.0 Memory Used in Saving 1.947752 MB

Environment: Oracle Linux 5 (Intel 64-bit)
java version "1.7.0_72
Java™ SE Runtime Environment (build 1.7.0_72-b14)
Java HotSpot™ 64-Bit Server VM (build 24.72-b04, mixed mode)

From the results given above, we can clearly see that 15.7.0 is performing slightly better than 15.6.0 but consuming way more memory than 15.3.0.

I think you still need to focus on memory aspects of Aspose Slides upcoming version. We are hoping that the new version will perform better or at least close to 15.3.0.

We eagerly want to migrate to Aspose Slides new version as it has some fixes but this memory issue hinders this migration.


Thanks
Manisha


Hi Manisha,


Thank you for your detailed feedback.

I have observed your comments and like to share with you that we are working on it and improving the performance is an iterative process. We hope for upcoming version of Aspose.Slides to be even more efficient.

Best Regards,

Hi Manisha,


We are investigating the issue reported by you and like to share with you that, we are unable to reproduce these stats (see JProfiler results with “-Xms512M -Xmx512M” in attached profile.zip). Please explain the memory profiling method to reproduce the results as shared by you so that we may investigate it further to help you out.

Best Regards,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.