Suggestions for performance improvement surrounding sending email notifications?

Posted by jcmoney on Stack Overflow See other posts from Stack Overflow or by jcmoney
Published on 2010-04-23T23:59:17Z Indexed on 2010/04/24 0:03 UTC
Read the original article Hit count: 206

Filed under:
|
|
|

It takes around a couple of seconds for my app to execute the code to send an email right now on a test server with nothing much else running. Not sure if this is typical/expected. I'm also using the php framework Kohana's email helper and not php's mail directly out of convenience if that matters. Is it always just better to schedule a cron job to send emails every 5 min or so? Or should I be able to send emails immediately and I'm just not doing something right?

What the script does is insert a row into the db and notifies the relevant group that the row was created. The groups are usually < 20 people so I just do a loop calling Kohana's email helper each time for each member of the group.

© Stack Overflow or respective owner

Related posts about php

Related posts about kohana