Author |
|
Sergei Newbie
Joined: 27 September 2011
Online Status: Offline Posts: 16
|
Posted: 01 November 2011 at 1:50am | IP Logged
|
|
|
Hi,
I've been optimizing perormance of the message sending and found that if I try to save message into stream then plain text for my message would be automatically generated. I found that this happen due to default flag on Builder.HtmlToPlainMode which is equals to HtmlToPlainAutoConvert.IfNoPlain.
That's not the problem, because I actually need that functionality. The problem is that if I try to save 15 thousands of messages I will get significant performance penalty. I analyzed the code via jetbrains dotTrace and found that a lot of time is spent on creating and running Regular expressions that are used to parse html body of the message. Moreover, I can see that .ctor method is called too often, which takes almost 2 seconds in my case.
Could you please enhance your code and:
* make your regular expressions static and readonly, so they would be instantiated only once per application running
* add RegexOptions.Compiled flag to every regular expression. That would significantly decrease execution time.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 01 November 2011 at 5:02am | IP Logged
|
|
|
I have checked this with lead developer of MailBee.NET Objects, and we absolutely agree on this. We'll make sure those changes are implemented soon.
Thank you for your invaluable contribution!
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 10 November 2011 at 6:08am | IP Logged
|
|
|
An updated DLL is now available for download. Thanks again!
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|