We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Slow PST Message Extraction due to large recipient count

I have encountered a few cases where a PST contains messages with thousands of recipients. In these instances when extracting and saving the MAPI message as an MSG, just extracting the message as a MapiMessage object takes a long time, several minutes per message. Using both the PersonalStorage#extractMessage and PersonalStorage#extractMessageToFile causes this behaviour. It appears to be due to the large recipient count in the messages. I’ve included a link to a zip file in DropBox containing example Java code to reproduce the issue as well as a PST containing messages with several thousand recipients which reproduces the problem. Thank you for the help

I’m using Aspose Email For Java 20.6 and Java 8 on Linux.


Can you please share the statistics achieved on your end which makes you feel about slow API performance. Please also share the machine and Java specifications along with heap size allocation.

I’m using Java 8, specifically

openjdk version “1.8.0_252”
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

The machines I’m running are EC2 instances with 16GB of ram with 8vCPUs. I’m using a heap allocation of 6GB, setting -Xms6g and -Xmx6g. I’m also using -XX:+UseG1GC.

I would expect extracting a message from a PST and saving as an MSG to take in the 10s of milliseconds . However, using the PST and code provided I’m seeing extracting a message from the PST and saving to an MSG taking several minutes–for each message.

Observing jstat I can see a bunch of young generation garbage collections triggering as the Eden space is filling up quickly. I’ve included screenshots from VisualVM of the CPU and Memory profiler. I can also include GC logs if that’s helpful.

Screenshot 2020-08-14 at 11.22.44.png (76.0 KB)

Screenshot 2020-08-14 at 11.23.27.png (98.7 KB)


I have opened a ticket with ID EMAILJAVA-34731 to measure the performance of the API with PST shared by you. I also request yo to please don’t remove the shared PST file link until the issue is addressed. We will share the feedback with you as soon as the issue will be fixed.

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

I can confirm the performance has improved. Before I was seeing each message take a few minutes to extract, it’s now taking about 25 seconds per message. This is much better but still not ideal. I would still expect much faster performance–low single digit seconds or less to create an MSG. I will create a new ticket to address this. Thank you for your help.


I have shared the feedback in our issue tracking system and will share the feedback with you if any further betterment is possible to achieve.