Skip Navigation

[Resolved] Portfolio page VERY slow

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.41 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 17 replies, has 3 voices.

Last updated by Beda 6 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#553435

Hello, this is Beda.

I just logged in to your site and it was quite fast.
I see no cache plugins as installed by Noman and I see no slowness on the site.

At least, not something related to Views, on the first glimpse.
I see the page /fotografie is a bit slower, but not 23 seconds.
Speed test tools are not trustable when it comes to page speed.
Yes they tell us how long something takes to load, but it will not take in consideration "human" experience".
That page, for me, loads within less then 10 seconds. This is slower than the rest of the site, and it should not happen of course.

You mention this is all solved when Toolset is disabled.

I have to ask, is it also solved when you use any other type of View?
Is ONLY this kind of View the issue?

Or is generally, activating Toolset, an issue?

As far I saw, it happens only when you random order the images and limit by a low number
(as example like wp-admin/admin.php?page=views-editor&view_id=485)

Now, Views has a debug tool which will tell me more about the Query, and also, locally, I will make some tests with no random and no limit in case I can replicate the speed issue.

Maybe you will have time to make some tests as well in that direction and let me know what the outcome is on your end.

In any way, I will be back here tomorrow with results

Thank you for the patience.

#553845

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.

#555119

This is expected.

We need to regenerate those Custom Thumbnails each time we load the View.

Hence, the only solution is to use a predefined Size.

Thank you for your patience.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.