We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Opening large files takes an excissve amount of time

I'm currently evaluating the DocIO using the free trial, and the other File Format libraries as well, for use in a document achieve system.

The issue I'm having is when opening large files, my test file has 1400 pages of text and images which total 150MB, the process takes over 110 seconds. Is there anyway I can reduce this time to something that is less than 30 seconds? It would also help if the memory footprint could be reduced as well. Currently I'm running the code through a console application written in C#, but the plan is to move it to a library that is called by an ASP.NET site. At the moment the current performance is a major issue for me.

I've had a look at this forum, and used Google, and the only advice I've seen so far is to split the file into smaller ones. Unfortunetly this isn't an option for the application I'm working on, as I have no control over the documents my users will archive.

Any help that can be provided would be appreciated.

6 Replies

GA Gareth May 23, 2016 04:35 PM UTC

To clarify the file that is causing me issues is a Word 97-2003 file. If I convert it, the size reduces and DocIO process it well within a reasonable time.


SV Sarathkumar V Syncfusion Team May 24, 2016 05:07 AM UTC

Hi Gareth,

Thank you for using Syncfusion products.

Please provide the input Word document, currently installed Essential Studio version and code snippet or your work flow which was used at your end. This will help us to investigate further on the reported performance issue and find out the exact cause of the issue at the earliest.

Regards,
Sarath 



GA Gareth May 24, 2016 08:45 AM UTC

Hi Sarath,

Unfortunetly I am unable to provide document that I'm having difficulties with due to confidentiality rules.

The code that I am using is:
using (FileStream filestream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
    using (WordDocument document = new WordDocument(filestream, FormatType.Automatic))
    {
        TextWatermark textWatermark = new TextWatermark()
        {
            Size = 10,
            FontName = "Arial Black",
            Color = Color.Gray,
            Layout = WatermarkLayout.Diagonal,
            Semitransparent = false,
            Text = watermarkText
        };

        document.Watermark = textWatermark;

        document.Save(filePath.Replace(".doc", "6.doc"), document.ActualFormatType);

        document.Close();
    }

    filestream.Close();
}

I found switching to opening the file via a file stream reduced the opening time by 10 seconds. But the conversion from stream to WordDocument is still taking one minute forty seconds.

The version of FileFormat that I'm using is "SyncFusion Essential Studio 14.1.0.41"


SV Sarathkumar V Syncfusion Team May 25, 2016 12:36 PM UTC

Hi Gareth,

Thank you for your update.

For further analysis, we have created Word 97-2003 format test case Word document with 1400 pages of text and images which total of 187 MB and tested this test case document using the code snippet which you have provided. The whole process(opening and saving) has been completed within 20 sections and please find the machine configuration details which we have tested this scenario from the below:

OS : Windows 10
RAM : 8 GB
Processor : Intel Core i5


On further analysis, we suspect that the reported performance issue is raised specific to some elements present in your input Word document used. So, please provide the duplicate copy of the input Word document with dummy content in the place of your confidential data along with your machine configuration details such OS, RAM and processor to reproduce the performance issue in our side. This will help us to analyze the exact cause of the issue and to provide a solution at the earliest.

Regards,
Sarath
 



GA Gareth May 25, 2016 03:04 PM UTC

Hi Sarath,

My machine is as follows:

OS: Windows 7
RAM: 16GB
CPU: Intel Dual Core 3GHz.

I've got a dummy data file that mirrors the issue, unfortunely I was unable to upload it (175MB). I've zipped it up using 7Zip to be able to upload it.

When I ran the dummy file on my machine it took 140 seconds to execute. A similar library I'm also evaluating managed to process it in 20 seconds.

Attachment: LargeTestFile_f118334.7z


SV Sarathkumar V Syncfusion Team May 26, 2016 12:25 PM UTC

Hi Gareth,

Thank you for your update.

A support incident to track the status of the
your query has been created under your account. Please log on to our support website to check for further updates,

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let me know if you have any questions.

Regards,
Sarath 


Loader.
Live Chat Icon For mobile
Up arrow icon