Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Mon Apr 12, 2021 8:40 am

Hi!

After porting project from .NET Framework to .NET Core 3.1, Spire.Doc.Document loading began to work slower more than 10 times. I'm using Spire.Office

My construction
Code: Select all
using (doc = new Spire.Doc.Document())
{
    string endsWith = f.Name[f.Name.LastIndexOf(".")..].ToLower();

    switch (endsWith)
    {
        case ".rtf":
            doc.LoadFromFile(f.FullName, Spire.Doc.FileFormat.Rtf);
            break;
        case ".doc":
            doc.LoadFromFile(f.FullName, Spire.Doc.FileFormat.Doc);
            break;
        case ".docx":
            doc.LoadFromFile(f.FullName, Spire.Doc.FileFormat.Docx);
            break;
        case ".odt":
            doc.LoadFromFile(f.FullName, Spire.Doc.FileFormat.Odt);
            break;
        default:
            doc.LoadFromFile(f.FullName, Spire.Doc.FileFormat.Auto);
            break;
    }

    ///
    ........
    ///

    doc.Close();
}


how can i try to fix this?
Thnk U!

RomaA8
 
Posts: 10
Joined: Fri Feb 17, 2017 11:27 am

Mon Apr 12, 2021 9:57 am

Hello,

Thanks for your inquiry.
Did you install our Spire.Office via Nuget?
To help us reproduce your issue and resolve it, please provide us with your input file. You could send it to us (support@e-iceblue.com) via email. Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 780
Joined: Mon Oct 19, 2020 3:04 am

Mon Apr 12, 2021 10:46 am

installing Spire.Office from Nuget only.
unfortunately, this happens to all files...

some off them
You do not have the required permissions to view the files attached to this post.

RomaA8
 
Posts: 10
Joined: Fri Feb 17, 2017 11:27 am

Tue Apr 13, 2021 3:17 am

Hello,

Thanks for providing your input file.
In the most recent versions of our Spire.Office, we removed the .NETCore dlls from the NuGet package, which means that if you install our product via NuGet, your project will use the .NETStandard dlls by default.

I tested your case with both our .NETCore dlls and .NETStandard dlls, and I found that when using .NETCore dlls, The speed will be greatly improved. Thus, for your situation, I recommend you install Spire.Office.NETCore package to use our .NET core dlls. If there is any question, please feel free to write back.


Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 780
Joined: Mon Oct 19, 2020 3:04 am

Tue Apr 13, 2021 12:33 pm

Hi!
Spire.Office.NETCore works fine)

Thank's!!

RomaA8
 
Posts: 10
Joined: Fri Feb 17, 2017 11:27 am

Wed Apr 14, 2021 1:24 am

You are welcome.
If you encounter any issues related to our products in the future, please feel free to contact us.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 780
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.Doc