Page 2 of 2

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Fri Feb 06, 2009 9:02 am
by bozzaj
xdecock wrote:Ok, i'm on the point to commit some major changes in CharacterStream

New values:

0.75 => ArrayCharacterStream
* 0.58 => importByteStream
These two by themselves seem to be a significant change! I'll test as soon as I can.

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Fri Feb 06, 2009 9:29 am
by bozzaj
xdecock wrote:Let us know the new performance
100 emails, with or without array cache, 61 seconds (originally 66)
Increasing _nextsequence from 4 to 8, 53 seconds
Increasing to 128, 45 seconds

Obviously, the _nextsequence change may not create correct output, but I just wanted to check.

While looking through the code, I noticed a potential problem with _standardize. In a case where the string is 76 characters and the ending character is a space or \t, the output becomes 78 characters. Am I reading this correctly?

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Fri Feb 06, 2009 9:58 am
by xdecock
100 emails, with or without array cache, 61 seconds (originally 66)
Increasing _nextsequence from 4 to 8, 53 seconds
Increasing to 128, 45 seconds


Ok, so we have other bottlenecks here at works :/

if it does not contain sensitive datas, can you please send me your test case by mail ? (my screenName@gmail.com)

i'll be able to profile deeper the bottlenecks you are triggering

(yes performance work is quite a lot of little works, so i prefer begining with the most usefull )

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Fri Feb 06, 2009 2:31 pm
by Chris Corbyn
bozzaj wrote:While looking through the code, I noticed a potential problem with _standardize. In a case where the string is 76 characters and the ending character is a space or \t, the output becomes 78 characters. Am I reading this correctly?
I'll put together a test case to check. Thanks for being so specific, that's very helpful :)

Xavier is god!

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Fri Feb 06, 2009 4:41 pm
by xdecock
Chris Corbyn wrote:Xavier is god!
I'm here incognito, don't repeat it XD

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Sat Feb 07, 2009 2:24 pm
by xdecock
Completely new CharacterStream Class
+ reworked CharacterReaders
, should speedup things a bit

However, it has not been optimized, so those results are preliminary tests:
[Vanilla (master branches, without new reader)]

Code: Select all

xavier@desktop-xavier:~/swift/vanilla/test-suite$ time php run.php Swift_Mime_ContentEncoder_QpContentEncoderAcceptanceTest
Swift_Mime_ContentEncoder_QpContentEncoderAcceptanceTest
OK
Test cases run: 1/1, Passes: 12, Failures: 0, Exceptions: 0
 
real    0m5.112s
user    0m3.052s
sys     0m1.728s
[NgCharacterStream]

Code: Select all

xavier@desktop-xavier:~/swift/swiftmailer/test-suite$ time php run.php Swift_Mime_ContentEncoder_QpContentEncoderAcceptanceTest
Swift_Mime_ContentEncoder_QpContentEncoderAcceptanceTest
OK
Test cases run: 1/1, Passes: 12, Failures: 0, Exceptions: 0
 
real    0m2.998s
user    0m1.912s
sys     0m0.924s
I still have some loops that needs optimizations however, but the first thing to do was making the proof of concept

PS: To DL, go there: http://github.com/swiftmailer/swiftmail ... 12c6c9/lib and click download (can't find the good link)

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Mon Feb 09, 2009 2:11 pm
by bozzaj
Chris Corbyn wrote:I'll put together a test case to check. Thanks for being so specific, that's very helpful :)
You're welcome - Just let me know when I don't give enough information. :)

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Thu Feb 12, 2009 10:16 am
by bozzaj
xdecock wrote:Completely new CharacterStream Class
+ reworked CharacterReaders
, should speedup things a bit
Finally had a chance to test this. Using the same body.html I've been using:

100 emails: (Edit: 4.0b5 is actually 4.0b5 with improvements previously made)
4.0b5, array cache, send - 61 seconds
ng, array cache, send - 66 seconds
4.0b5, array cache, batchsend - 62 seconds
ng, array cache, batchsend - 66 seconds
4.0b5, disk cache, send - 62 seconds
ng, disk cache, send - 66 seconds
4.0b5, disk cache, batchsend - 62 seconds
ng, disk cache, batch send - 67 seconds

Fairly consistent regardless of which style (array/batch settings) I use.

Let me know if there's anything else you need from me!

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Mon Feb 16, 2009 4:58 am
by xdecock
i'll check a way to re-gain speed as fast as i can, but i have little time for the moment.

Re: Switching from PHPMailer to Swift - Speed Issues

Posted: Mon Feb 16, 2009 9:47 am
by bozzaj
xdecock wrote:i'll check a way to re-gain speed as fast as i can, but i have little time for the moment.
No worries - I know that these things take time.