[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] email in CGIs




In Regards to your letter <v01530500ad3ec5d1fcdb@[129.105.139.47]>:
> I am wondering if there is any way to speed up CGI scripts that include
> email being sent.
> 
> I find that MacPerl is pretty fast when it comes to normal script handeling
> but when I added a mail message sent to someone using sockets the return
> time for the script jumped from 2-3 seconds to 13-15 seconds.  Has anybody
> else experienced this problem.  I have not had that great of a time jump
> when programing a UNIX box.

The reason for this is that the UNIX mail program spools the mail
to disk immediately, and then "spins off" a process for background
transmission of the email over TCP. Thus, it returns in the amount
of time it takes to write the email to disk.

On the Mac, you are waiting for the entire TCP based SMTP transaction
to complete, which takes time especailly for hostname lookups and connect
times. The only way around this would be to find a process on the Mac that
could spool your email for you and return immediately, doing the smtp later.

I am close to releasing a program, with source code, that would accomplish
this for you. Not sure how long that will be, but most definitely within
a month or so.


tim.

time@ice.com  (UUCP: heifetz!tbomb!time)

USENET - a slow moving self parody... ph