Free Support Forum - aspose.com

Aspose.Email Performance

We recently upgraded from Aspose.Email 18.4 to 19.7 and have experienced significant slowdowns.

Test Environment

Two PSTs were tested with similar results. The numbers below are from one of these PSTs:

EDT2012.PST
13,664 items
1.42 GB

Test machine: Dell XPS15 i7-6700HQ, 32GB, 1TB SSD. Visual Studio 2017. Release mode.

Issue 1: Aspose.Email 19.7 is significantly slower than Aspose.Email 18.4

Running the attached test program using Aspose.Email 18.4 takes 26 seconds. Running it using Aspose.Email 19.7 takes 3 min 47 sec.
TimeAsposeEmail.zip (5.1 KB)

Aspose.Email 18.4 Aspose.Email 19.7
00:00:26 00:03:47

Issue 2: Accessing certain properties increases processing time.

The code contains the following lines:

//var headers = mapiMessage.Headers;
//var body = mapiMessage.Body;
//var bodyType = mapiMessage.BodyType;

The table shows the impact of uncommenting each of those lines and running the test again. Of most concern is the amount of extra time taken when including a call to the BodyType property:

Aspose.Email 18.4 Aspose.Email 19.7
Base 00:00:26 00:03:47
with mapiMessage.Body line 00:00:28 00:03:49
with mapiMessage.Headers line 00:00:44 00:03:59
with mapiMessage.BodyType line 00:06:03 00:09:11

To follow up on this, we have performed the same tests with Aspose.Email 19.10 (.NET 4.0 DLLs) and received roughly the same results as with 19.7.

@edtsoftware,

Thanks for contacting us. Can you please share source PST file so that we may further investigate to help you out.

The original PSTs we tested cannot be provided.

However, I ran the Issue 1 test against a couple of the publicly available Enron PSTs, and received similar differences between the different versions of Aspose.Email:

albert_meyers_000_1_1.zip (4.8 MB)

albert_meyers_000_1_1.pst - 1,162 items

Aspose.Email 18.4
00:00:01.239

Aspose.Email 19.10
00:00:10.752

andrea_ring_000_1_1.pst - 1,013 items

Aspose.Email 18.4
00:00:02.503

Aspose.Email 19.10
00:00:12.990

A zipped copy of the albert meyers PST is included.

Some quick testing of Issue 2 indicated the issue of accessing certain properties degrading performance was not as severe when using the Enron PSTs. It should be noted though that the Enron PSTs are not really “real world” data – they were generated by a 3rd party tool, not by MS Outlook, which might have something to do with it. I tested another “real” PST created from Outlook, and it demonstrated similar issues to the previous non-Enron ones:

EDT2017.pst - 5,054 items

Aspose.Email 18.4
00:00:17.163
with BodyType access:
00:01:44.194

Aspose.Email 19.10
00:01:53.787
with BodyType access:
00:03:19.993

@edtsoftware,

I have worked with source file and sample code shared by you and unable to observe the issue. I have also shared my generated result with you for your kind reference.Can you please share complete environment details with us.2019-11-20 21_35_38-E__TimeAsposeEmail_TimeAsposeEmail_bin_Debug_TimeAsposeEmail.exe.png (25.9 KB)

Thanks for your reply.

I see from your screenshot that the output was “Items visited: 86”, whereas when I run the code I receive “Items visited: 1,162”. I suspect that you commented out the license.SetLicense("Aspose.Total.lic");. Please uncomment this line and provide your own license file so that Aspose.Email can be used without trial restrictions.

After doing this, please run the code using Aspose.Email 19.10 and 18.4 and compare the time taken.

Thanks

@edtsoftware,

Can you please check attachments. I have shared my results with you after applying license into project. I like to inform that i have tested this using 19.10 and 19.8 versions and shared results with you.results 19.8.png (38.2 KB)
results with 19.10.png (22.0 KB)

Thanks for confirming that it is taking around 10 seconds with 19.10. Can you please try it with 18.4 to see if it was much faster with that older version?

@edtsoftware,

I like to inform that we have created an issue with ID EMAILNET-39658 in our issue tracking system to investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once issue will be fixed.

Hi Adnan.

Does EMAILNET-39658 cover both of the issues originally raised? i.e. does it include the issue of accessing mapiMessage.BodyType taking a relatively long time?

Thanks

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

Thanks, issue 1 as raised in the initial post seems to have been addressed.

However issue 2 from the initial post still remains. Specifically, accessing certain properties dramatically increases the time required to process a PST. In particular the mapiMessage.BodyType property.

image.png (24.8 KB)

In a certain 1.6GB PST which I am unable to provide to you (but you should experience the same behaviour with your own large PSTs), 61% of the time to process the PST is spent in just accessing the mapiMessage.BodyType.

Aspose.Email 19.11
time for mapiMessage.Headers 00:00:13.00
time for mapiMessage.Body 00:00:00.49
time for mapiMessage.BodyType 00:02:14.00
Total time to process PST 00:03:38.00

This is with a new version of the test utility. Please supply your own license file and example PST > 1GB.

AsposeEmailPerf 2019-12-03.zip (4.4 KB)

@edtsoftware,

Thank you for sharing the feedback. We have updated the information in our issue tracking system and will share feedback with you as soon as it will be shared.

@edtsoftware,

Based on feedback shared by you and issue with ID EMAILNET-39670 has been created in our issue tracking system for investigation and resolution. We are likely to resolve this in upcoming Aspose.Email for .NET 19.12.