Here is the deal with the WordPress cache plugins: even if you install such plugin, there is a fair amount of users who load your sites without speed benefits of cache. No matter if you use Hyper Cache, WP Super Cache, WP Rocket or W3 Total Cache.
WP cache plugins simply skip the cache altogether if the visitor left a comment on the website with his browser by checking for the comment cookie. That’s quite ineffective if you have 10K posts on your blog and the user only left a comment on a single article. Now imagine that your blog has a lot of discussion where dozens of users actively participate – you will see your server load going up.
WP cache plugins typically allow you to send cached data to these comment authors, but that means they don’t get the “Your comment is awaiting moderation” message, which is unacceptable.
Our work on this started when we discovered that singe post view on one of our busiest websites takes 1500 – 2000 ms on average and that the cause is not high number of SQL queries, but slow PHP execution (even though we do use PHP op cache). We analyzed what takes so much time and it was the wp_list_comments() function. This site gets tens of thousands page views every day and there is an average of 120 comments per article. Some articles have thousands of comments and we don’t like to page them. We don’t like paging at all.
That’s why we added a comment caching solution into FV Thoughtful Comments – our comment front end moderation tool. It stores the comments HTML in a file and serves to that to all visitors who are not logged in and don’t have a pending comment under the article.
Simply enable Settings -> FV Thoughtful Comments -> Comment cache. Our solution works with both paged and unpaged comments and support WPTouch Pro for the mobile site. It also works great with any existing WP cache plugin.
Here’s where the Comment cache can be enabled
Does it really improve site speed?
We made a lot of claims, so let’s support it with some data. Here’s the graph of /single transaction time of New Relic for our website:
New Relic /single transaction – no comments cache
Here’s the same graph after FV Thoughtful Comments Comment cache was enabled:
New Relic /single transaction – with FV Thoughtful Comments comments cache
The difference speaks for itself:
before: 1,690 ms
after: 1,060 ms
Here’s a table which tells you what is the average page load time (H ) depending on number of comments and comments cache:
Page load time [ms]
Number of comments
Default WordPress
FV Thoughtful Comments
29
401.062
309.062
101
630.988
318.401
1,007
3080.305
371.369
4,997
12459.64
649.616
The above tests were performed on localhost with 10 repetitions for each test.
Martin graduated as an engineer in Computer Science from Slovak Technical University in Bratislava. He grew up in Liptovský Mikuláš in northern Slovakia next to the beautiful Tatra mountains. He is the developer behind our FV Player.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Necessary Cookies
Strictly Necessary Cookie allow you to log in and download your software or post to forums.
We use the WordPress login cookie and the session cookie.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
Support Cookies
Foliovision.com uses self-hosted Rocket.chat and self-hosted Freescout support desk to provide support for FV Player users. These cookies allow our visitors to chat with us and/or submit support tickets.
We are delighted to recommend self-hosted Rocket.chat and especially Freescout to other privacy-conscious independent publishers who would prefer to self-host support.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
3rd Party Cookies
This website uses Google Analytics and Statcounter to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
We reluctantly use Google Analytics as it helps us to test FV Player against popular Google Analytics features. Feel free to turn off these cookies if they make you feel uncomfortable.
Statcounter is an independent Irish stats service which we have been using since the beginning of recorded time, sixteen years ago.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
Leave a Reply