When extracting the first message (an email with dead links) from this PST, extraction ends after 28 minutes
https://www.dropbox.com/s/hd899ynvyr0kbj3/disco.redacted.pst?dl=0
Would be nice if there was an option similar to Aspose Words WebRequestTimeout to control how long to wait for external links … I am running this on AWS lambda with a 5 minutes time limit, so if the fix was to complete the extraction just a bit faster it would be still a problem for me.
This is the code to repro the problem:
fileName = @"/tmp/disco.redacted.pst";
repro.ExtractPst(fileName);
public static void ExtractPst(string pstfilename)
{
Program.InitializeAsposeMailLicense();
string path = pstfilename;
// Save message to MemoryStream
using (PersonalStorage personalStorage = PersonalStorage.FromFile(path))
{
List<string> allMessageIds = GetAllMessageId(personalStorage.RootFolder);
foreach (string entryIdString in allMessageIds)
{
using (MemoryStream memorystream = new MemoryStream())
{
Console.WriteLine("Saving {0} at {1}", entryIdString, DateTime.Now);
personalStorage.SaveMessageToStream(entryIdString, memorystream);
Console.WriteLine("Saved {0} at {1}", entryIdString, DateTime.Now);
}
}
}
}
static List<string> GetAllMessageId(FolderInfo folder)
{
List<string> messageIdList = new List<string>();
var messageIds = folder.EnumerateMessagesEntryId();
messageIdList.AddRange(messageIds.ToList());
var subFolders = folder.EnumerateFolders();
foreach (var subFolder in subFolders)
{
var someMessageIds = GetAllMessageId(subFolder);
messageIdList.AddRange(someMessageIds);
}
return messageIdList;
}
The extraction ended in 28 minutes and 9 seconds
This the output:
Saving AAAAAL2xUkNnDGRDmFL/vBbnjTmkDiEA at 4/8/2019 6:56:02 PM
Saved AAAAAL2xUkNnDGRDmFL/vBbnjTmkDiEA at 4/8/2019 7:24:11 PM