Toolset Views 2.8.1 with performance improvements

   Dario

May 20, 2019

This release improves the way that Toolset Views handles caching. You will see the biggest change on large sites with frequent content updates.

How Views cache works

Toolset Views plugin needs to keep a list of all custom fields on the site. Generating such a list is very server-intensive so Views stores it as a permanent cache.

The challenge with handling such a cache is deciding when to invalidate it so that the expensive rebuild process is not run too often.

Cache improvements in Views 2.8.1

Toolset Views 2.8.1 greatly improves this caching mechanism. Now, it will regenerate this cache only when absolutely necessary.

These improvements will be most noticeable for large sites where content is published and updated very frequently.

For example, our own Toolset.com and WPML.org sites are huge and include ever-running forums. With this release, Views is no longer rebuilding its cache literally all the time and the performance improvements for us are big.

Manually managing Views cache

Toolset Views now also allows you to manually manage this cache. You can find this option on the Toolset -> Setting page, under the Front-end Content tab.

Views cache options on the Toolset Settings page
Views cache options on the Toolset Settings page

If you select the option to keep the cache until you clear it manually, the cache will be considered valid until you clear it here.

If you add custom fields to your site without clearing the cache, Views will automatically update the cache with new fields as soon as a value was saved to them. However, the cache will only be updated and not rebuilt so it will not impact the site’s performance.

Download and Update

If you registered Toolset on your site, you can get this update automatically from the admin. To download plugins manually, go to your Toolset accountโ€™s Downloads page.

Donโ€™t forget to backup your site before updating.

Feedback?

Are you running a larger site whose content updates frequently? Do you notice any performance improvements with this release?

Let us know in the comments below and weโ€™ll get back to you!

 

Comments 17 Responses

  1. Hey fantastic! This was a real issue for us on a couple of sites and we could only resolve it with a hack. I’ll remove the hack and do some comparison testing between the new and old views versions. The problem is easy to spot with Query Monitor – if you see a slow query SELECT DISTINCT meta_key FROM wp_postmeta then this is a fix. With very big post meta tables (3 million rows) this query could take 10s of seconds to run.

  2. Whilst not critical to me right now, the update caused my site to stop working:

    ==================
    Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.

    In this case, WordPress caught an error with one of your plugins, Toolset Views.

    An error of type E_PARSE was caused in line 66 of the file /home/milfordassociate/teesdalelocal.co.uk/wp-content/plugins/wp-views/application/controllers/cache/meta/manager.php. Error message: syntax error, unexpected ‘::’ (T_PAAMAYIM_NEKUDOTAYIM)
    ===================

    All latest software is in use.

    I hope this is of some help.

    Tony

    • Hi, Tony! Thanks a lot for reporting this and I’m sorry to hear this has happened. I raised this immediately with our developers to investigate. It would help us a great deal if you would be so kind as to also create a ticket for this in our professional support (please paste a link here). Thank you!

    • Hi again, Tony! Quick update – the issue could be related to the PHP version your site is using. Please mention your PHP version when opening a ticket. Supporters will escalate this issue directly to our main developer as soon as you create a ticket. Thank you!

  3. Much appreciated! Performance/ site speed is more and more important on the internet!

    • Hi, Ed! Sorry to hear this. Could you please report this in our professional forum? This way, our supporters can investigate the issue with your site and see exactly what is the pattern with the issue. It would be also great is you would past the link to the support ticket here. Thank you!

    • Hi again, Ed! Just a quick note โ€“ this could be related to the PHP version your site is using so please mention your PHP version when opening a ticket. The team is notified and will escalate this issue directly to our main developer as soon as you create a ticket. Thank you!

  4. Dario,
    Thanks. That’s exactly what it was. I had 5.6 installed on that domain. I updated to 7.1 and all is well.
    Thanks, again!

    • Hi, Ed! Thanks for the swift reply! I am happy to hear this, you fixed that really quickly! ๐Ÿ™‚

      We are still investigating this to make sure nothing is missed.

      By the way, from my experience, you will really enjoy PHP 7.1. Besides being more secure, I remember the awesome performance boost after switching from 5.something to 7.0. ๐Ÿ™‚

  5. Please note that a quick fix for the issue with PHP 5.6 was released yesterday and the current Views version is 2.8.1.1