• Hello,

    Hope you are doing fine.

    I was unloading unused javascript and CSS and I have noticed something which seems weird (might be wrong).

    When you plugin is inactive (on mobile):
    Total Blocking Time: 4 860 ms
    JavaScript runtime 7.8 sec
    The work of the main thread 14.3 s
    screenshot: https://nimbusweb.me/s/share/4605639/83fncoulbgxbhm6q3q6y
    When is active (on mobile):
    Total Blocking Time: 8180 ms
    JavaScript runtime: 12,6
    The work of the main thread: 21,9
    screenshot: https://nimbusweb.me/s/share/4605495/psd3dn87t9ooq7vz01r5

    All are higher when your plugin is active shouldn’t be the other way around?
    The page has a better score and definitely optimize the speed but those numbers seem really weird to me…

    Is there an explanation or it is just wrong and ain’t working as it should?

    Note that your plugin is now active.

    Thanks in advance.

    Best regards,

    Marco

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Albert Peschar

    (@kiboit)

    Hey @adskiller,

    To be sure that you’re comparing apples to apples, you can use the ?phast parameter to disable PhastPress for single requests.

    Compare these results:

    * Active (?phast=phast)
    * Inactive (?phast=-phast)

    If I’m not mistaken, the results are as you would expect: the relevant metrics are lower with PhastPress enabled than when it’s disabled.

    –Albert

    Thread Starter adskiller

    (@adskiller)

    Hey Albert,

    I really don’t understand why it’s different when I do it.

    I have just did it with
    * Active (?phast=phast)
    * Inactive (?phast=-phast)

    See the result:
    active: https://nimb.ws/A1UhZB (desktop) higher with PhastPress enabled
    inactive: https://nimb.ws/y7XztP (desktop) lower with PhastPress disable
    active: https://nimb.ws/eFRtjJ (mobile) higher with PhastPress enabled
    inactive: https://nimb.ws/vqBtCh (mobile) lower with PhastPress disable

    Also, it varies a lot sometimes it can be x20 higher and after another test lower and so on…

    Seems like something is interfering with your plugin and is preventing it from delivering properly.

    What do you think?

    Marco

    • This reply was modified 4 years, 5 months ago by adskiller.
    Plugin Author Albert Peschar

    (@kiboit)

    Hey @adskiller,

    I’ve now run three tests each with PhastPress enabled and disabled and picked the best results.

    When PhastPress is disabled:

    When PhastPress is enabled:

    It is true that the Total Blocking Time is slightly higher with PhastPress enabled, and all the other measurements are a lot lower. In my tests the measurement next to “Minimize main-thread work” is always lower with PhastPress enabled.

    What PhastPress does is delay scripts so that they are executed after the page is rendered. This improves most measurements and the user experience. The actual script execution might take a little bit longer, and this can be reflected in the Total Blocking Time and Minimize main-thread work metrics. But because the scripts are executed while the page is already rendered, the impact to the user experience is much less.

    In short, it looks to me like things are working as expected and the increase of the Total Blocking Time can’t be avoided.

    –Albert

    • This reply was modified 4 years, 5 months ago by Albert Peschar. Reason: Formatting
    Thread Starter adskiller

    (@adskiller)

    Hello Albert,

    Thanks for your feedback.

    Seems like you are right. Just don’t understand why sometimes with google pagespeed sometimes I have Total blocking time per example of 2000 and after another test 1000 and back and forth. It’s very inconstant for some reasons… So, I think something is messing up with the total blocking time somehow. I can get a score between 70 and 90… Would be great if it would stay to 90 all the time^^.

    Is it a normal behaviour ?? If not I might hire someone to dig furthermore…

    Anyway, I got a score from 11 to 75/90 on desktop on google pagespeed thanks to your plugin combine with WP Cloudflare Super Page Cache, imageKit CDN, Lazy Loader (support background images), Lazy Load Background Images for Elementor. I know 3 plugins for lazy-load. I have tried the 3 of theme separatetly and yours doesn’t lazy load background image, lazy load plugin doesn’t lazy load the one your plugin lazy load but background images but not the one from elementor so another one for elementor and work nicely. Everything work fine on all browser tested (gooogle, firefox, explorer).

    I have tried other plugin’s optimizations and yours is the best by FAR!!!

    SO BIG THANKS FOR YOUR PLUGIN AND YOUR SUPPORT!!!

    However, I think I have spotted an issue with elementor and responsive (hide option on device).

    If you check my page on google pagespeed you will see that a background image I have hidden on desktop is served on mobile by your plugin when it shouldn’t and that the background image I have hidden on mobile is server on desktop when it shouldn’t.

    Again thanks for everything.

    Best regards,

    Marco

    Plugin Author Albert Peschar

    (@kiboit)

    Hi @adskiller,

    PageSpeed Insights uses a simulated device to measure the Total Blocking Time. I think the results will depend on the speed of the connection at that moment, and possibly other factors that are not consistent each time. So I wouldn’t worry about those results too much.

    The most important thing you can do for your site’s speed is to reduce the amount of JavaScript files you use. You can use Asset CleanUp to remove any JavaScript files that are not important for your site’s functionality.

    Regarding the load of the unneeded image on desktop/mobile. It happens on Google Chrome, because Chrome seems to preload images that are used in inline stylesheets even if they are not displayed due to the size of the browser window. This is not really a big issue, I think. In any case, I don’t know a way to avoid this without preventing preloading for all images.

    Thanks for your kind words! If you did not do so yet, I would really appreciate it if you left a review here.

    –Albert

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘JavaScript runtime and The work of the main thread higher when plugin active’ is closed to new replies.