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!