Fixed Optimising alerts by mass-sending method


Well-known member
One of the downsides of data writers being shown here I think. I'd like to see data writer functionality that could group inserts/updates in some way when all content is the same it is using just with one column different (as in the user_id in this example).

Digital Doctor

Well-known member
Would it be useful / possible to distribute mass alerts over time ?

FWIW, an easy way to get rid of this problem is to close mass threads and open up a follow up thread.

or get rid of "automatically watch threads which you have replied".

Of course, "automatically watch threads which you have replied" is a great feature to get new users engaged. :)

Brent W

Well-known member
FWIW, an easy way to get rid of this problem is to close mass threads and open up a follow up thread.
Then xenForo would be no better than vBulletin in handling large threads.


Well-known member
Moreover, when conversation has 100 and more members server doesn't respond at the time and member post duplicate messages.

Please think about making email notifications by cron.
For example, our national social network send emails not at the moment but after some time.
It has next options:
  • Turn off email notifications
  • Send email notifications no more than one a day
  • Send email notifications no more than one a week
So your site mail will not be recognized as spam as now happen very often.

All alerts can be sent by 1 insert query instead of hundred of them.


Well-known member
One simple thing I've done is put outgoing emails and alerts needing to be sent into a variable, then do the actual sending on __destruct(). Doesn't change how long it takes to send them, but the user experience isn't part of that time.

Chris D

XenForo developer
Staff member
@digitalpoint when you do move to 1.2 you might want to look at the Deferred system as an alternative.

Probably nothing wrong with what you're doing but the Deferred system is ideal for handling this as, likewise, it doesn't affect the user experience.


Well-known member
I hope this is fixed for XF 2.0, as this is being an issue with pervasive use of email notifications in addition to reply alerts on the forums I look after.


XenForo developer
Staff member
This is fixed in 2.0 in that we push watch alerts/emails into a job so the amount of time they take to process doesn't really matter. (There's a framework for this for add-ons to extend if they want to implement it for their content types.)