Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: how to speed the mail process?

by fmerges (Chaplain)
on Aug 27, 2007 at 13:13 UTC ( #635290=note: print w/ replies, xml ) Need Help??


in reply to how to speed the mail process?

Hi,

Resuming...

Can you provide with more code, basically important stuff is not shown, like construct_the_customers_template, sned_customer_mail, mark_the_flag_in_msgdb.


If you want to profile where it's spending time, you have a lot of options like Devel::DProf, or for timing, a nice one Benchmark::Stopwatch.

I think the db stuff can be improved a lil'bit, not only in speed also in quality, see statement handler, mark_the_flag can also be an already prepared statement...

Mail stuff, as someone pointed out already, I would decouple it from your main script, by queuing it into a local SMTP server.

About what happen inside of ...customers_template function, I hope you're using a fast templating system, or one at all, and not some home made not optimized at all ;-)

Regards,

fmerges at irc.freenode.net


Comment on Re: how to speed the mail process?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://635290]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-09-17 10:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (71 votes), past polls