Fixed Optimising alerts by mass-sending method

guiltar

Well-known member
I have noticed that alerts give a huge overhead in old threads.
So I suggest to create mass-alert method and handle them all together instead of separately.
It would save hundreds of queries!

Screenshots made while inserting new post.
 

Attachments

  • Screenshot_92.webp
    Screenshot_92.webp
    11.1 KB · Views: 142
  • Screenshot_93.webp
    Screenshot_93.webp
    81.5 KB · Views: 139
  • Screenshot_94.webp
    Screenshot_94.webp
    70.8 KB · Views: 125
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).
 
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. :)
 
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 vk.com 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.
 
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.
 
@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.
 
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.
 
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.)
 
Back
Top Bottom