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.

4 comments Effect of Relevanssi on page speed

  1. Hi,

    Code Profiler scan says Relevanssi is taking most of time to load, impressive 1,6s.
    Is anyone getting this same problem?

    1. Marcio, is that happening only on search results pages or does it happen on every page load? If it happens on search results pages, it’s not a problem, but fairly normal Relevanssi performance. If it’s happening on every page load, then yes, that’s a problem if you’re not doing a search.

        1. Try checking with Query Monitor to see what’s going on. If you are using Relevanssi Premium, it may be problems with API calls, in which case checking “Disable update version checking and attachment indexing” should stop it.

Leave a Reply

Are you a Relevanssi Premium customer looking for support? Please use the Premium support form.

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