[commits] Horde branch master updated. 2265864e5dcf8ea2adb004f616b989ad38482a16
Michael M Slusarz
slusarz at horde.org
Wed Feb 1 08:08:52 UTC 2012
The branch "master" has been updated.
The following is a summary of the commits.
from: ed7f3b9cbd284dcd95327fcc3e5f2799e8b8290b
63994ea phpdoc, cleanups
90462df [mms] Improved parser for e-mail addresses (Request #10949).
2265864 Require newer Mail package to prevent incorrect Exceptions
-----------------------------------------------------------------------
commit 63994eace5765ca151bc9259b020f874c371331c
Author: Michael M Slusarz <slusarz at horde.org>
Date: Tue Jan 31 11:50:17 2012 -0700
phpdoc, cleanups
framework/Mime/lib/Horde/Mime/Address.php | 28 +++++------
framework/Support/lib/Horde/Support/StringStream.php | 43 +++++++++++++-----
2 files changed, 45 insertions(+), 26 deletions(-)
http://git.horde.org/horde-git/-/commit/63994eace5765ca151bc9259b020f874c371331c
-----------------------------------------------------------------------
commit 90462df31f5ec31200a1ed9144f6569e3a203d33
Author: Michael M Slusarz <slusarz at horde.org>
Date: Sun Jan 29 21:04:06 2012 -0700
[mms] Improved parser for e-mail addresses (Request #10949).
The previous parsing method involved splitting at "important" RFC 822
characters (e.g. < . :) and then brute-forcing to see if this was the
correct decision. New code goes through the string linearly, checking
the grammar against the ABNF contained in the RFC.
Performance statistics: On a message with 50 e-mail addresses,
performance was 20x faster. Within the script itself, total cumulative
time within the parseAddressList() method went from 92% -> 7%.
Real performance numbers are probably not quite this great. The new
library substnatially reduces recursion. Methods relying on recursion
are artifically slowed down by xdebug since each function call has a
more significant performance penalty than under regular PHP since
xdebug needs to record data about each call. Even factoring this in,
the new code is a substantial performance improvement - for messages
containing substantial numbers of e-mail addresses (> 30), the limiting
bottleneck was previously Rfc822 address parsing. This should no longer
be the case.
framework/Mail/lib/Horde/Mail/Rfc822.php | 1026 +++++++++-------------
framework/Mail/lib/Horde/Mail/Rfc822/Address.php | 74 ++
framework/Mail/lib/Horde/Mail/Rfc822/Group.php | 40 +
framework/Mail/package.xml | 24 +-
framework/Mail/test/Horde/Mail/ParseTest.php | 59 +-
5 files changed, 601 insertions(+), 622 deletions(-)
create mode 100644 framework/Mail/lib/Horde/Mail/Rfc822/Address.php
create mode 100644 framework/Mail/lib/Horde/Mail/Rfc822/Group.php
http://git.horde.org/horde-git/-/commit/90462df31f5ec31200a1ed9144f6569e3a203d33
-----------------------------------------------------------------------
commit 2265864e5dcf8ea2adb004f616b989ad38482a16
Author: Michael M Slusarz <slusarz at horde.org>
Date: Tue Jan 31 22:09:41 2012 -0700
Require newer Mail package to prevent incorrect Exceptions
No need to keep around static version of parser object - creating a new
object is trivial.
framework/Mime/lib/Horde/Mime/Address.php | 35 ++++++++--------------------
framework/Mime/package.xml | 2 +-
2 files changed, 11 insertions(+), 26 deletions(-)
http://git.horde.org/horde-git/-/commit/2265864e5dcf8ea2adb004f616b989ad38482a16
More information about the commits
mailing list