• Resolved vgnavada

    (@vgnavada)


    Hello,
    I’m hosting my site at KINSTA.
    Recently there were lots of 502 ERRORs. When I asked the support team, They said;

    Looking into the details of the slowest transaction, /archive-product, I do see it appears the slowest component is Smush\Core\Modules\Helpers\Parser::process_images by far taking 115,000 ms to complete:

    Screenshot: https://prnt.sc/1d5cl6r

    I see it appears that this Smush component continues to be problematic for the other slowest requests as well. This can be seen in the screenshots below:

    Screenshot: https://prnt.sc/1d5djck

    It does appear that the wp-smushit plugin is causing the longest transaction times. I would recommend temporarily disabling Smush to see if that helps improve overall performance. If performance is improved, I would recommend reaching out to the Smush developers to discuss this issue further as they will be able to help ensure everything is configured correctly, and help provide a solution if available!

    So as per the above suggestions, We disabled the plugin and asked them to run a test again, And things have improved a lot.
    Screenshot: https://prnt.sc/1d63jly

    Can somebody please help?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Dimitris – WPMU DEV Support

    (@wpmudev-support6)

    Hello there @vgnavada

    The functionalities that could cause some increase in page load are Lazy Load and Tools->Detect and show incorrectly sized images.

    Could you please let us know which one of these were you using? Or probably both?

    Finally, as I couldn’t replicate such slow responses when tested both of these functionalities in a testing site of mine, would it be possible to create a staging site in where you could re-activate Smush and share a public URL here with us, in order to further check?

    Thank you,
    Dimitris

    Thread Starter vgnavada

    (@vgnavada)

    Hello @wpmudev-support6 ,
    We were using Lazy Load only. Not the other one.
    Yes, I have created a staging site and re-activated the SMUSH, Also activated LAZY LOAD – Here is the link: https://staging-oormaniangadi.kinsta.cloud/

    Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @vgnavada

    Thanks for sharing staging site!

    The “process_images” process from Smush is a part of a parser that checks HTML of a given page for images and modifies image markup to inject code necessary for, in this case, lazy load. It seems, however, the the issue here is mostly related to the DOM construction (how the site “source” is “structure”).

    What I mean is that the parser has to analyze entire page “source” and this apparently is very complex. For example, for the homepage it’s nearly 5,5 thousands of lines and the total DOM elements reported by GTMetrix is 3745 which is over 4,5 times the recommended maximum of 818 elements.

    This alone makes the page “heavy on rendering” which may not be much of an issue with modern browsers (especially on a relatively fast connection and machine) but here it’s additional script that needs to process this all, in addition to multiple other processes on site running “under the hood”.

    I did some testing on my end and while there’s not much “code-wise” that could be done about that, there are some things that are worth testing that could/should help a bit:

    1. make sure that you don’t have additional Lazy Load or other “real time” image processing features enabled on site unless they are really necessary (those may be in other plugins or in the theme)

    2. in Lazy Load settings in Smush
    – take a look at “Media Types” option and see if there are any that you are not using on site and/or don’t need to lazy load (I suppose iframe would be one of them and probably .svg too)
    – at the “Post types” in “include/exclude” section; I don’t know your site well but there might be some where either lazy load doesn’t really help much or that don’t really have many images “below the fold” – switching them off may be good for performance

    3. test also if there’s a difference for you depending on the “Native lazy load” option settings – in some cases switching to other one than it currently is set to makes quite a lot of a difference;

    Kind regards,
    Adam

    Thread Starter vgnavada

    (@vgnavada)

    Hi @wpmudev-support8 ,
    Thanks a lot for the detailed response.
    I guess the theme also has inbuilt LAZY LOAD and that might have been causing some clashes. Let me recheck the theme documentation once and see if I can disable it and keep only SMUSH Lazy loading. Give me a day’s time.
    I’ll update the progress here.

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @vgnavada

    Take your time,

    Yes, we suggest keeping only one Lazy Load feature to prevent conflicts.

    Best Regards
    Patrick Freitas

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @vgnavada

    I hope you are doing well and safe!

    We haven’t heard from you in a while, I’ll mark this thread as resolved.

    Feel free to let us know if you have any additional questions or problems.

    Best Regards
    Patrick Freitas

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Parser::process_images by far taking 115,000 ms’ is closed to new replies.