[dokuwiki] mail_send() inefficiencies
- From: "Joe Lapp" <joe.lapp@xxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sat, 29 Oct 2005 00:22:35 -0500 (CDT)
mail_send() receives address strings of the form "name1 <abc1@xxxxxxx>, name2
<abc2@xxxxxxx>, ..." It then parses these strings into names and addresses and
performs character and validity tests.
If edits on a site are infrequent or there are few subscribers to any page,
this extra work likely goes unnoticed. But if the same names and addresses are
being parsed and tested over and over again on multiple pages, possibly with
many (100s to 1000s) of subscribers on a single page, the hit could be huge. I
don't know when page load time would noticably slow, but there's potential to
significantly reduce server scalability.
I realize that the address strings are normally being read from files, but
ideally we'd validate and possibly also encode the strings before storing them
in the file. mail_send() ought to just assemble the headers. (Didn't Chris
Smith just advise me that validation is the caller's job? ;-)
Besides, mail_send() is spitting out error messages on invalid addresses, but
it seems to me that it's too late to do so here. Maybe we need a separate but
centralized email validation library (i.e. keep the functionality, but factor
it out of mail_send() for use by calling entities)?
~joe
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist
- Follow-Ups:
- [dokuwiki] Re: mail_send() inefficiencies
- From: Joe Lapp
Other related posts:
- » [dokuwiki] mail_send() inefficiencies
- » [dokuwiki] Re: mail_send() inefficiencies
- [dokuwiki] Re: mail_send() inefficiencies
- From: Joe Lapp