This is a critical issue for us and we’re on a very tight deadline. That’s why I posted late on a Sunday night when we finally narrowed down the issue. I noticed you are addressing issues posted hours later, but so far I haven’t gotten a “hello” from Aspose. I understand you “answer issues in the order in which they are reported” and that you don’t “cherry pick” issues. In that spirit please feel free to give me some sort of response so I can decide how best to proceed.
I uploaded a fake doc to priority support forum. The doc is very unremarkable as you will see. I attempted to compensate for the extreme slowness by using parallel processing. This resulted in a 12.5 minute delay which I described in the priority support thread. What I think would be more useful for you to investigate is the splitting process. I believe it may be more of an issue than the actual documents. I’ll continue my thread in the priority support forum.
Try this code. It's based on code Aspose employees have posted on this board:
public class Splitter
{
private List<Document> _childDocuments;
private Document _sourceDocument;
public Splitter(Document sourceDocument)
{
_childDocuments = new List<Document>();
_sourceDocument = sourceDocument;
// Loop through all sections.
for (int i = 0; i < _sourceDocument.Sections.Count; i++)
{
DateTime startTime = DateTime.Now;
Console.WriteLine(string.Format("Begin: {0}", startTime));
Section section = _sourceDocument.Sections[i];
// Create empty document.
Document subDoc = new Document();
subDoc.RemoveAllChildren();
// Append section to the empty document.
subDoc.AppendChild(subDoc.ImportNode(section, true, ImportFormatMode.KeepSourceFormatting));
int pgCount = subDoc.PageCount;
DateTime endTime = DateTime.Now;
Console.WriteLine(string.Format("End: {0}", endTime));
Console.WriteLine(string.Format("Elapsed time: {0}\n------------", endTime.Subtract(startTime).TotalMilliseconds));
// Save sub document to docx.
subDoc.Save(string.Format(@"c:\temp\output\DocToSplit{0}-{1}.docx", i, pgCount));
}
}
This is a simple example that accurately reproduces the issue on my end.