One of the big inefficiencies I can see in this module is that it potentially throws a large majority of the db rows it fetches down the toilet when it checks in php if it needs to send reminders. If the database could do that heavy lifting (what it is designed to do), you could add the time since last cron to the db query and not have to check every active reminder to see if it's time has come. With an optimized query (that only fetches the reminders that need to be sent) you aren't doing any unneeded loops in the php foreach.

Let me know if you'd like any further clarification about what I am talking about.
Thanks,
Pat

CommentFileSizeAuthor
#1 1878246-cron_last.patch1.17 KBfizk

Comments

fizk’s picture

StatusFileSize
new1.17 KB

Thanks Pat, I completely agree with you. Here's a patch, let me know if that's what you were thinking. I'm not sure if we'd need to use cron_last here.

fizk’s picture

Status: Active » Needs review
fizk’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.