Memory issue with small Excel file

Hi,


When i convert the attached excel file to pdf it takes about 400-500 MB memory during converting the document. The original size of the excel file is only 191KB.

Can you see the problem why it takes so much memory?

Thanks and best regards

Thomas

Hi Thomas,

Thanks for your posting and using Aspose.Cells for Java.

We have tested your issue with the latest version and it did not take huge amount of memory. It took only 64MB memory at our end. Please download and use the latest version: Aspose.Cells for Java 7.6.0. It should fix your memory issue.

We used the following code to test this issue. We have attached the output pdf for your reference.

Java


String filePath = “F:/Shak-Data-RW/Downloads/file.xls”;


Workbook workbook = new Workbook(filePath);

workbook.save(filePath + “.out.pdf”);



Thanks for your answer.


I used the latest version 7.6.0 and exactly your code example for testing.
I assume it has something to do with loading the fonts because my profiler shows high memory usage when the aspose is loading the fonts (font-sytle: calibri) over the java class sun.awt.FontConfiguration .
Maybe the memory usage depends on the operation system or/and java version.

I made my test on the following enviroment.
Windows 7 Professional SP1 64-bit
Java 1.7.0_04 / 64-bit

Can you confirm my adoption?

I made another test with an apple enviroment (OS Mavericks) and the memory usage was about the same as you had in your test.




Hi Thomas,

Thanks for your input and using Aspose.Cells for Java.

We were able to observe this memory issue on Windows 7 64-bit with Java 1.7. We have logged this issue in our database for investigation. We will look into it and resolve this issue if possible. Once, we will have some fix or update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40646.

Hi Thomas,

Thanks for using Aspose.Cells.

We have tried and compared JDK of 64-bit and 32-bit. It seems not issue
of our component, but the JDK itself.

Such as below code:



Object[] arr = new Object[10000000];

for(int i=0; i<10000000; i++)arr[i] = new Object();


which has nothing to do with Aspose.Cells. With 32-bit JDK, it uses
about 130M memory and less than 500ms. But with 64-bit JDK, it uses 255M
memory and more than 10 seconds.