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

Free Support Forum - aspose.com

Need advice on reducing memory usage when creating large spreadsheets

We have a 95.6 MB spreadsheet that gets produced from a Java process whose memory usage jumps by almost a Gigabyte when it enters the section of code that uses Aspose.Cells to write the spreadsheet. To accommodate this large memory requirement of the Aspose.Cells library, we push the memory usage up on the Java VM to a max of 1.5 GB (-Xms256m -Xmx1536m) from our normal limit of 512MB.

Without the VM increase, we get the out of memory exception shown below.

Are there ways to reduce the memory overhead of writing large spreadsheets with Aspose that could reduce our memory requirements? We have tested this process using the latest Aspose library version for Java v8.1.2

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at

com.aspose.cells.b.a.d.h.a(Unknown Source)
at com.aspose.cells.b.a.d.h.b(Unknown Source)
at com.aspose.cells.b.a.d.h.b(Unknown Source)
at com.aspose.cells.b.a.d.h.a(Unknown Source)
at com.aspose.cells.Ak.a(Unknown Source)
at com.aspose.cells.Ak.a(Unknown Source)
at com.aspose.cells.Ak.a(Unknown Source)
at com.aspose.cells.Ay.a(Unknown Source)
at com.aspose.cells.Ax.a(Unknown Source)
at com.aspose.cells.Ax.b(Unknown Source)
at com.aspose.cells.Ax.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)

Hi,

Since the release of Aspose.Cells 8.0.0 we provide memory usage options. In later versions we also enhanced the memory usage and performance. So, while working with big Excel Files or having large datasets, you may utilize the options, please see the document for your reference:
http://www.aspose.com/docs/display/cellsjava/Optimizing+Memory+Usage+while+Working+with+Big+Files+having+Large+Datasets

We recommend you to kindly try our latest version/fix: Aspose.Cells for Java 8.1.2 with memory preference option on.

If you still find the issue, kindly do create a sample JAVA program (runnable) with your template files if you have any, we will check it soon.

Thank you.

Thank You, using the 8.1.2 library with the memory performance turn on lowered the run time memory requirement from 1.5 GB to 512 MB for our largest sheet to date.

Hi,


Good to know that your issue is figured out now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.