Hi, my users noticed that writing properties to an 8 Mb Excel document located on a network drive is taking about 40 seconds. A similar operation with OpenXML is only taking about 20 seconds… I was wondering if there is a way to improve the performance with Aspose? Thanks.
Kindly share the complete details of the use case, including source Excel document, code and let us know which Aspose.Cells for .NET API version you are using. We will investigate and share our findings with you.
Please find attached a sample project that shows the performance difference. You can see it in a local file, but it is easier to see if the file is in a slow drive, like a remote shared drive. I used an 8 Mb Excel file for testing… unfortunately I can’t upload here since the limit is 3 Mb. Thanks.
AsposePropertyPerformance.zip (6.7 KB)
Thanks for your sample project and using Aspose.Cells.
We checked your project and found some compile-time errors. Please submit a project that does not have any such errors so that we could run it at our end and investigate this issue.
Here is a screenshot for your reference.
The project builds fine, but it uses some C# 7.0 features… do you have access to a Visual Studio 2017 environment to build it? https://blogs.msdn.microsoft.com/dotnet/2016/08/24/whats-new-in-csharp-7-0/
When you say shared drive, does it mean, file is somewhere like on DropBox, Google Drive etc. If that is the case, then Aspose.Cells does not have any ability to download workbook from internet. So, the slowness problem in network drive does not arise. You must download your Excel file yourself. Once, you will download it, then it will not remain Remote File but it will become Local File.
It means, there is no concept of Remote File in Aspose.Cells. Aspose.Cells deals with Local File only. If the file is remote, user writes extra code to download it into array of bytes and create workbook object.
What I understand is that you are comparing some library like OpenXML with Aspose.Cells. Because, Aspose.Cells has nothing to do with internet or network. Please elaborate the issue more and clarify it. Thanks for your cooperation in this regard and have a good day.
I just mean a shared network drive… as in a shared folder in Windows:
The general issue is that the drive is slower than a local disk. When I use Open XML, the process is slower but only takes a few seconds. When I use Aspose with the same drive, the response time is at least twice as slow as Open XML.
Thanks for clarification. We will look into it and help you asap.
1 - Aspose.Cells will parse all data of the file into API, OpenXml only parses the partial xml for your need.
So if you only get and set document properties, OpenXml will work faster than Aspose.Cells.
Please try WorkbookMetadata API if you only want to parse document properties.
2 - If the file is on a shared network drive:
Please read the file into a stream from the shared network drive, then open it with new Workbook.
And save the file into the memory stream, then save memory stream into the shared network drive.
Great, I’ll try these suggestions… thanks.
Is there an API for MetaData in Aspose.Words and Aspose.Slides as well? I looked into the API documentation and couldn’t find them…
Please post the query related to Aspose.Words and Aspose.Slides in their respective forums. You can also post a single query in Aspose.Total forum. Please click on the given links to move to relevant forum.
Actually, my original post was in the Aspose.Total forum since it was a generic request for all products (although my sample code was for Excel). I think someone in the Aspose team switched this to Aspose.Cells… I don’t think I can switch it back. Can this be moved to Aspose.Total?
We have moved your query to Aspose.Total forum. Please spare us some time, we will update you asap.
Thanks for your patience.
Please visit the following links for required information on
- Getting Metadata information from PowerPoint presentation using Aspose.Slides for .NET.
- Getting Document information from MS Word file using Aspose.Words for .NET.