Slow to open large xlsx file

Hi,

Opening the attached file using Aspose Cells takes over 600 seconds. It takes 30 seconds to open the file in Microsoft Excel. We are using version 2.1.1.

Can you please have a look and see if you can optimize this.

Do you plan to support the loadData method for xlsx files?

Thanks and best regards,
Ulf Ekström


Hi,

Well, I tested, using MS Excel to open your template xlsx file manually does take some time, so it will require certain memory to load/open the file using Aspose.Cells for Java. We will look into it if we can optimize to load the file quickly. We will get back to you soon.

Thank you.

Hi,

The memory consumption is not an issue for us in this case. The JVM did not even use all of its available memory.

Most of the time is spent in the two following methods:

49.9% - com.aspose.cells.ap.h
37.9% - com.aspose.cells.ap.a

Both are called from the Rows.getRow method.

Hope this helps.

Best regards,
Ulf Ekström

Hi Ulf,

Please try the attached fix. We have made some improvements for opening such large xlsx files. Since in such xlsx file there are cells that contain plain data (without other objects such as Shapes) mainly, I am afraid, the loadData method won't be of much help/effect for improving the performance. However, if you just want to fetch and use data from the file (without other requirements such as modify and re-save the workbook, parsing formulas, ...etc.), I think you can try our LightCells APIs that work in event-driven mode. You may take following threads as reference for using LightCells:

1) https://forum.aspose.com/t/90477
2) https://forum.aspose.com/t/90383
3) <a title="blocked::https://forum.aspose.com/t/90477</font></a></div> <div>4) <a title="blocked::https://forum.aspose.com/t/94018
5) <a title="blocked::https://forum.aspose.com/t/89884</font></a><br><br><br>Thank you.<br></div>

Hi Amjad,

Thank you so much for the fix. The Workbook.open method now loads in less than 50 seconds!!

The funny thing is that (after this fix) it takes more time to load the file using LightCells than the Workbook.open method. I used the following code:

LightCells l = LightCells.getInstance(“c:/file.xlsx”, FileFormatType.EXCEL2007);

l.processWorkbook(new CellHandler() {

public boolean startSheet(int i) {
return true;
}

public boolean startCell(int i, int i1) {
return true;
}

public void process(LightCell lightCell) {
Object value = lightCell.getValue();
}
});

The good thing with LightCells is that the memory consumption goes down when I don’t need to save the visited objects.

Thanks & Best regards,
Ulf Ekström


Hi Ulf,

Thank you for pointing out the performance issue of LightCells. Please try the attached latest fix. For LightCells we have made some improvements for loading data. By our test, the time taken by LightCells is less than Workbook.open() now.

Thank You & Best Regards,

Great.

Thanks,
Ulf

The issues you have found earlier (filed as 12238;12238) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Amjad

I have allready large xlsx file ( greater than 20 MB ) located on harddrive. My recquirment is that I have to open the that xlsx file through java application. Pl. help me to get out of this.Normal API throw 'OutputStream encountered error during write' exception. Pl. help me.

Thank you.

Hi,

Please download and try our latest version v7.0.4, set all the jars into your class path, now replace the main jar with v7.0.4.5 (latest fix: Please download: Aspose.Cells for Java v7.0.4.5.)

If you still find the issue, please zip the Excel file and attach it here, we will check your issue soon.

Thank you.

Hi Amjad,

We are trying to download xlsx file from Oracle 12.2.9 which is downloading at 800kb/sec but earlier in 12.1.3 it was downloading at 2.3 mb/sec. We are using aspose jar to download the file. Could you please help us here what could be the issue?

@Jayaraj,

Your issue does not seem to be related to Aspose.Cells by any means. So, you should check configurations/settings with Oracle and other network aspects and resolve it.

Thank you . Will Aspose Jar file get changed based on Java version as we know in 12.2.9 Java will be updated or it does not have any impact ? currently we are using aspose-cells-8.8.0.jar version

@Jayaraj,

Generally, changing Java might not impact the performance too much. Since you are using an older version of Aspose.Cells for Java (i.e., aspose-cells-8.8.0.jar), so we recommend you to kindly upgrade to latest APIs set, i.e., Aspose.Cells for Java v23.1 (Releases | Maven) and give it a try to your scenario/case.

@Jayaraj,

There are too many factors may influence the performance of downloading. For our component, what we can handle is the performance of generating data for the resultant spreasheet files.

To isolate the issue, please save your workbook to memory stream firstly and then send data in memory stream to client. In this way you can log the time cost of Workbook.Save() to compare the performance of different versions of our component. If you do find there is significant difference between the two versions, please provide us the executable code and files so we can reproduce and trace the issue.

However, we can only provide fix based on our latest versions(if we reproduced the issue). So, as Amjad recommended, for your convenience the best way is to upgrade to our latest versions and then perform the test.

Thank you @Amjad_Sahi and @johnson.shi for your kind response . We will try to use the latest API of Aspose.cells . Could you please help where we can download or find the latest version ?

@Jayaraj
Please download the latest version on Aspose.Cells 23.1 | Process Spreadsheet Formats via Java API or install it wtih Maven.

WHere is the attached file?

@JohnLI,

In the release page, click on “Package Explorer” link and then download “aspose-cells-23.1.jar”.

I mean the " large xlsx file". Is that for any large xlsx file or just specific one?