• Hi,

    I have a somewhat complex setup for a page, but it seems to have uncovered a performance issue. I’m not sure that it is PODS / PODS Themer related, but it seems to be.

    The Setup

    1. I have a PODS CPT defined, with a custom field (called primary image) to hold an uploaded image.
    2. A Beaver Themer singular page layout is created to display the image (plus other content). The image on the page layout is inserted via a Beaver Builder (Power Pack) image module with the connector pointing to the PODS custom field (i.e. primary image). The image size is also specified in the module.
    3. A Page is created with a Posts Content Grid module on it that pulls in the CPT. For the content of the grid post, the page layout defined in step 2 above is inserted by setting the content to custom and using [fl_builder_insert_layout] with the ID set to the Themer Layout of step 2.

    All of the above works fine. The Content Grid is able to display the custom layout defined by the Themer singular page for each individual post in the content grid.

    The Problem

    For some time I’ve been fighting a serious performance problem on the content grid page of step 3. Loading the page could be extremely slow (as in > 6 minutes), or most of the time it results in an http 500 error or server too busy error.

    I’ve been thinking that this was a CDN / Caching issue and have been trying to isolate it based on that. But at this point it doesn’t seem to be CDN/Caching related.

    Replicating the Problem

    In this case, most (but not all), of the images loaded to the PODS CPT are 1024 x 1024.

    In Step 2 when the Image module is connected to the PODS custom field, a size is also specified for the image (see https://share.getcloudapp.com/nOuKPznW ). If the size selected matches one of the generated thumbnail sizes (e.g. 1024 or less), then the page performance seems to be fine.

    However, if an image size is selected in the Themer layout that is larger, then the page performance tanks big time. I think this is because the image thumbnail for that size is not generated.

    For example, on the Themer layout if I select a large image size of 1600 x 1600, and the image size actually uploaded to the CPT is 1024 x 1024, then WP will not generate that thumbnail size. So the Themer template is looking for a size 1600 x 1600 image for each of the uploaded images, but that thumbnail size isn’t available.

    My theory is that if an image size isn’t found, then a search of the entire media folder & sub-folders is conducted to try and find it. And if not found, maybe the original uploaded image is used. That folder & file search takes a long time and it is repeated for every post in the grid.

    Of course, if the thumbnail size does exist (e.g. 1024 x 1024) then the image is found right away and performance is fine.

    Just a theory…

    This seems to be PODS Themer related, but it could also be Beaver Themer, Beaver Builder, or even WordPress. I just haven’t noticed this behavior when using content grids with no PODS Themer involved, that’s why my first suspicion is some relationship to PODS Themer integration.

    Let me know your thoughts, any questions or clarification you need, or if you need an environment set up to replicate the issue.

    Thanks,

    -Norm

  • The topic ‘Performance hit with connected images and size is not available’ is closed to new replies.