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

Re: [cobalt-users] FormMail is SO slow.



Patrick Béart <patrick@xxxxxxxxxxxxxxxxxxx> wrote:
> FormMail.pl (Matt Wright's script) is a poorly written PERL
> program. That it runs slow is most likely indicative of both of these
> facts.

Give Matt Wright some credit.  His scritps were written *years* ago and were
some of the first free, highly available useful CGIs.  But you are correct on
both points.  ;-)

> If you want it to run faster, consider a compiled (C, or
> similar) program, or a better PERL script. I use "Mailto.cgi",
> instead.

Or consider using PHP.  For increased speed you can even avoid PHP's mail()
function and use an SMTP mail class like the following:
http://phpclasses.upperdesign.com/browse.html/package/14.  Or consider writing
form email output to a database (like MySQL) and creating a cron job to run
periodically that calls a script (Perl, PHP, etc.) that loops through the DB
table and sends the emails out.  I'm a firm believer in keeping the speed of
applications fast from the user perspective by delaying long or high-CPU tasks
until late night or handling them automatically outside of the browser session.

--
Steven Werby {steven-lists@xxxxxxxxxxxx}