Posted on

Effect of Relevanssi on page speed

A Relevanssi customer asked whether Relevanssi can slow down a site. They have a slow site and their hosting provider had suggested Relevanssi might be the reason, because Relevanssi had a huge table in the site database.

That is true – Relevanssi tables can be really big. But they’re not accessed at all except during searching, so it shouldn’t matter how big the table is. Fortunately site speed is something that can be measured, so we can make some actual experiments here.

The experiment

I used Kirjavinkit as the testing ground, because it’s one of the biggest sites I run. It has about 9,000 posts. The wp_posts database table is about 128 megabytes, with another 10 megabytes in indices, while the wp_relevanssi table is hefty 270 megabytes, with 400 megabytes of indices (this ratio of Relevanssi taking almost five times as much space as the actual posts is fairly typical.)

So, if having a big Relevanssi table slows down the site, the effect should definitely be visible on this site. I ran three tests using a speed test tool provided by my hosting provider Seravo (one of the best WP hosting companies in the world, by the way). It’s basically a pretty wrapper for curl which hits the front page 20 times in row, making multiple requests every time and averaging the times.

The results

With Relevanssi enabled, the front page loading time averages ranged from 0.161 to 0.187 seconds.

With Relevanssi disabled, the loading times were slightly faster: from 0.154 to 0.164 seconds. However, this is far from something anybody would actually notice, on average maybe ten milliseconds faster.

Then I truncated the Relevanssi database table to make sure it doesn’t have effect, and the speeds varied from 0.154 to 0.177 seconds. No noticeable difference there.

Based on this, I think it’s safe to say having a big Relevanssi database table has no effect on site loading times. If you do notice a difference on your site, that would suggest there’s something wrong.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.