Convert to html and MHtml is much slower for some files

Hi,


Aspose.Email 17.2 is much slower than Aspose.Email 16.10 when converting some files to html or mhtml.

Here is an example for 5 converts. The time is in milliseconds:
file: “96778_Umlauts_MuchSlower.msg”
16.10
t0:Aspose.Convert - time=1237
t1:Aspose.Convert - time=26
t2:Aspose.Convert - time=32
t3:Aspose.Convert - time=26
t4:Aspose.Convert - time=27

17.2
t0:Aspose.Convert - time=2277
t1:Aspose.Convert - time=1126
t2:Aspose.Convert - time=1072
t3:Aspose.Convert - time=1057
t4:Aspose.Convert - time=1052

The source code looks like this:

var sw = Stopwatch.StartNew();

var doc = MailMessage.Load(inputPath);

doc.PreferredTextEncoding = System.Text.Encoding.UTF8;

doc.Save(inputPath + “.mhtml”, SaveOptions.DefaultMhtml);

Console.WriteLine($“t{testId}:Aspose.Convert - time={sw.ElapsedMilliseconds}”);

Are you aware of this regression? What is the reason for it?

Best Regards,
Vassil

Hi Vassil,


Thank you for writing to Aspose Support team.

It seems that the actual issue lies with loading the MSG files as if you take the loading of MSG statement out of the loop, the difference of conversion is not that much. Could you please verify the same to us? We have used the following sample code to observe the same at our end.

Sample Code:

//var inputPath = “828344\WG_Much_Slower.msg”;
var inputPath = “828344\96778_Umlauts_MuchSlower.msg”;
var sw1 = new Stopwatch();
sw1.Start();
var doc = MailMessage.Load(inputPath, new MsgLoadOptions());
Console.WriteLine(sw1.ElapsedMilliseconds);

for (int testId = 0; testId < 5; testId++)
{
var sw = Stopwatch.StartNew();


doc.PreferredTextEncoding = System.Text.Encoding.UTF8;
doc.Save(inputPath + “.mhtml”, Aspose.Email.Mail.SaveOptions.DefaultMhtml);

Console.WriteLine($“t{testId}:Aspose.Convert - time={sw.ElapsedMilliseconds}”);
}

Yes, I can confirm that the issue is entirely in the Load method. The Save is fast enough.


Best Regards,
Vassil

Hi Vassil,


Thank you for confirmation.

We have logged this issue as EMAILNET-38657 for further investigation by our Product team and will update you here once there is some information or a fix version version available in this regard. We regret the inconvenience caused to you.

The issues you have found earlier (filed as EMAILNET-38657) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan