I removed all Plugins that are not Toolset and added the Twenty Seventeen Theme.
The Performance of the page /fotografie/ improved.
But not satisfyingly.
I saw the long query is "other", and it loads not a single data. It just hangs there, 24 seconds long.
As soon Views is disabled, that is solved.
I then saw you do not have a single View but 4 of them, on that page.
I removed one by one.
Without [wpv-view name="foto-galerij-10-fotos"] we are down to 9/12 seconds.
Without [wpv-view name="productfoto-carousel"] we are not any better than above.
Without [wpv-view name="foto-gallerij-7-fotos"] we improve massively - 5 sec max.
Without [wpv-view name="video-slideshow"] we of course are down to minimal load time.
The heaviest Views are:
[wpv-view name="foto-galerij-10-fotos"]
[wpv-view name="foto-gallerij-7-fotos"]
foto-galerij-10-fotos:
- the issue is not related to how it's sorted
- you do not have any queries there
- there are only ten posts, and you call only 10
- It is related to what is in the View Loop.
The Proof is this:
- use the Loop Wizard and simply output a numbered list of Post titles.
- be amazed on how fast things load.
foto-galerij-7-fotos:
- the issue is not related to how it's sorted
- you do not have any queries there
- there are only ten posts, and you call only 10
- It is related to what is in the View Loop.
The Proof is this:
- use the Loop Wizard and just output a numbered list of Post titles.
- be amazed on how fast things load.
So we have a problem with that Loop.
Let's find out what exactly produces such a long load.
- in both Views, you call only the Post Body with Content Template "Enkele foto".
- In there is this code:
<div class="photo" data-fancybox="gallery" href='[wpv-post-featured-image size="full" output="url"]' style='background-image:url([wpv-post-featured-image size="custom" width="1500" output="url"])'>
<div class="portfolio"><a class="button">Bekijk portfolio</a></div>
</div>
Now, put that code directly in the loop of your views.
The speed does NOT improve.
We know now, it's not the Content Template, not the complex GRID, but something in the HTML above.
Let's call only [wpv-post-featured-image size="custom" width="1500" output="url"].
The View is still slow.
So we have the culprit.
Loading that particular Shortcode requires around 10/13 seconds.
You load it twice per view hence, 25 seconds...
I can also replicate that on a new View on your Duplicator.
Just calling [wpv-post-featured-image size="custom" width="1500" output="url"] makes it slow.
Note that, this is a Custom Size image - it works great with any other predefined size.
And I think I can replicate that locally.
I will report it, but it could be that this is expected since it needs to generate the custom size each time you load the view.
For now, I highly recommend choosing a pre-defined size.