Hi,
On the site hidden link it takes ages to load a page. We've looked into what is holding up the pages and it turns out all pages that contain a Views block have this issue.
This is the query that takes between 22 and 99 seconds to load:
---
SELECT mock_posts.* FROM mock_posts LEFT JOIN mock_icl_translations wpml_translations
ON mock_posts.ID = wpml_translations.element_id
AND wpml_translations.element_type = CONCAT(?, mock_posts.post_type) WHERE ?=? AND (
(
SELECT COUNT(?)
FROM mock_term_relationships
WHERE term_taxonomy_id IN (?)
AND object_id = mock_posts.ID
) = ?
) AND mock_posts.post_type = ? AND ((mock_posts.post_status = ?)) AND ( ( ( wpml_translations.language_code = ? OR ? ) AND mock_posts.post_type IN (?,?,?,?,?,?,?,?,? ) ) OR mock_posts.post_type NOT IN (?,?,?,?,?,?,?,?,? ) ) GROUP BY mock_posts.ID ORDER BY mock_posts.post_title DESC
---
Is this a known issue? And how can this be resolved?
Kind regards,
Tim de Jong
Hi,
Thank you for contacting us and I'd be happy to assist.
I've checked the page that you've shared and it seems to load for me in 9.21 - 9.33 seconds.
Are you experiencing this in any particular browser or when logged-in as a specific user?
If yes, you're welcome to share more details and the temporary admin login details for that user and I'll be able to investigate this accordingly.
Note: Your next reply will be private and though no changes will be made on your website, please make a complete backup copy, before sharing the access details.
regards,
Waqar
Hi Tim,
Thank you for sharing these details.
During the tests, the homepage of the staging environment loads for me in 12.24s, on average. Considering the number of plugins running in the background and the amount of content involved for rendering, this loading time seems to be normal.
I couldn't perform query analysis on this staging environment using the "Query Monitor" plugin ( https://wordpress.org/plugins/query-monitor/ ), as it seems the server configuration doesn't allow it.
( it shows this message: No database queries were logged because the SAVEQUERIES constant is set to false. )
If you'll check your website's page(s) through speed/performance testing tools like Pingdom ( hidden link ), Google's page speed insights ( hidden link ) and GTmetrix ( hidden link ), you'll find the common issues are related to how the static content is delivered on the front-end.
Most of the points mentioned in those tools can be improved using a good cache and code minification plugin. You'll also find some useful tips around optimization from this guide:
hidden link
I hope these points will help and please let me know how it goes.
regards,
Waqar
Indeed, updating Views did the trick. Thanks!