Add new comment is slow in WordPres on posts with many comments
Recently I had the third case of very slow comment submission on a blog with many comments. One of these blogs has a couple of posts with over 5000 comments each. The other two have a huge load of traffic (20-30k+/day) and a fairly high amount of comments (500-1000 comments/day).
How the problem was manifesting? While browsing the blog was snappy (less than 2 seconds document load), posting a comment will result in a 5 to 50 seconds page load. One of the blog also throw memory errors (it was hosted on a limited VPS).
At first, I thought there is a caching problem, but after a very quick check (all of these uses various WP plugins for caching), I decided the problem was somewhere else.
What’s one of the most useful thing on a blog? Subscribe to comments! While this doesn’t really sound as a big deal, it is! Because the popular plugins used for this feature (Jetpack & subscribe to comments) are sending the mail in second you posted your comment. I’m not saying this is a bad thing, I’m just saying this may be improved (by, dunno, deffer mail sending? setting a WP Cron job?)
Anyhow, long story short, the problem was fixed by disabling subscribe to comments plugin and blogs became snappy again.
Do you need this?
Let’s be honest, chances to have a post with over 2-3000 comments are pretty low, or to have 500+ comments/day on a daily basis are even lower. So probably you are safe to use this kind of plugins. Otherwise you should consider disabling this kind of plugins (until a better plugin will be released).