• Resolved madjedo

    (@madjedo)


    Hi, I am currently experimenting with the WooCommerce blocks plugin and wanted to check out the mini cart widget.

    So I added the mini-cart widget to my classic theme and the site went from 30 requests and 1.6mb to a total of 70 requests and 3.3mb transferred.

    The site is localhost and not using gzip.

    But still, an extra 40 requests + the lazyload requests that happens after clicking on the mini-cart. Are you sure this is not a bit too much?

    Previous sites I built with WooCommerce usually performs OK.

    Is this something you have considered “fixing”?

    The mini-cart block itself works and looks great though. It is however a very large performance hit.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks for reporting, this is definitely not expected and I’ve created an issue: https://github.com/woocommerce/woocommerce-blocks/issues/7176

    Plugin Author Albert Juhé Lluveras

    (@aljullu)

    Hey there, @madjedo. Thanks for bringing this to our attention. In fact, this is not an issue, but the expected behavior of the Mini Cart block.

    The reason why the Mini Cart block preloads those scripts, is to ensure they are ready when the shopper interacts with the Mini Cart, guaranteeing there is no waiting time between clicking the Mini Cart button and the Mini Cart drawer opening.

    Regarding the performance considerations, allow me to point out a couple of things:
    * the scripts are downloaded after the page is loaded and finished rendering
    * they don’t block or slow down page rendering, and they shouldn’t affect negatively the performance of the page: they are downloaded in the background, but not executed
    * once they have been downloaded once, the scripts will be in the browser cache, so in practice they are only downloaded on the first page the shopper visits

    If you want to know more, this mechanism is explained in detail in this post: How does WooCommerce Blocks render interactive blocks in the frontend?

    Hope that helps!

    Thread Starter madjedo

    (@madjedo)

    Thank you for your thorough response @aljullu

    Though lazy loading, and other similar “tech” usually strike me as tricks instead then actual performance gains. One way or the other, the assets are still going to load.

    And when you consider the number of users with old smartphones and slow 3G connections, this becomes an important issue. Especially when we are talking e-commerce and conversion rate optimization.

    Since opening this ticket I have tested a few other cart plugins. And they all manage to load about 75% less resources then yours. And just from the looks, they seem to behave almost exactly the same as yours. Your plugin/block does however win out in ‘accessibility’.

    I haven’t done a lot of more detailed testing on your mini cart block to understand where or why it needs all these assets. But I guess it’s coming from different libraries for javascript, CSS, and fonts. So I would encourage you to see what else could be done for performance other than just lazy loading because lazyloading is just lazy.

    Other than that, your block works and looks just fine. It is also accessible, which is a huge plus for me.

    Hi @madjedo

    Since this is being discussed in GitHub, I’d suggest subscribing to the GitHub thread mentioned previously, to get updates about progress.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Mini-Cart, bloat deluxe?’ is closed to new replies.