A client site that is growing fast recently complained that the site is slow when creating nodes or when commenting.
The slowness was very noticable, taking up to 30 seconds from the time "Submit" button is clicked, until the site comes back with a new page.
The site has approximately 14,000 nodes, 109,000 comments and 22,000 users.
After a lengthy investigation it turned out that it was the subscription module that was the cause for the slow down. Every time a comment or node is posted, subscriptions executes a set of queries and sends the emails to those subscribed to the nodes or taxonomies.
This takes a lot of time.
However, there is a workaround for this, right in subscriptions' settings.
The following options allow the emails to be sent when cron runs, not when nodes or comments are posted:
Use cron for notifications
Sends subscription notification when cron module runs. Default is to send upon node update.
Note: Currently only tested with MySQL.
There is a bit of a performance hit when cron runs, but it is not noticable. It is certainly better than thousands of users having delays when posting nodes or comments.
Comments
Visitor (not verified)
Good Info
Mon, 2007/10/01 - 16:19This is great info guys. Thanks for pointing it out.
I use the cron setting in subscriptions because it gives me time to moderate comments before they're forwarded to our userbase. It's pretty embarrassing when someone posts a Viagra advertisement as a comment and then Drupal forwards it to your subscribers.
Sure wish Subscriptions and Organic Groups checked to see if a comment or node were published before sending notifications.
Kevin
Visitor (not verified)
Comment-notify
Fri, 2007/10/12 - 12:45There is a module in the works (http://drupal.org/project/comment_notify) that is trying to correct this exact issue, Kevin. The author managed to get the core comment module patched to allow for a comment_notify to notify modules that a comment has been published (http://drupal.org/node/156475). This would effectively solve the problem you mentioned.
Jonathan
Visitor (not verified)
Option has been removed
Thu, 2007/10/04 - 09:31Hi,
That option has been removed by chx in the 2.x version.
http://drupal.org/cvs?commit=78751
Regards,
JF
Yog (not verified)
Can you please tell me where
Fri, 2017/08/18 - 10:05Can you please tell me where to find those options you mentioned in the article?