WooCommerce Seeks to Improve Cart and Checkout Blocks Performance

WooCommerce Blocks maintainers are asking the developer community to share feedback on any performance issues they are experiencing with the Cart and Checkout blocks.

“We’re aware there is work to be done in this area and we want to improve,” WooCommerce developer Alex Florisca said.

“We’re specifically interested in any performance related issues that may be stopping merchants or developers from adopting the Cart and Checkout blocks over the shortcode version.”

The plugin’s repository has nine open issues categorized as related to performance. Most of them are not straight forward and require more research and testing. For example, an issue with running multiple blocks of product grids was reported as having increased response times of 4+ seconds. Contributors have proposed a few different ideas to address performance issues, such as experimenting with useSuspenseSelect to improve the perceived loading experience for various blocks and finding a way to track the performance of the Cart and Checkout blocks. Neither of these tickets have seen much movement yet.

Store owners will not be eager to switch over to a checkout experience that is slower, so the WooCommerce team is seeking feedback that will help them make the cart and checkout blocks faster. So far, one user reported that due to a bug in a third-party plugin, he got a glimpse of what the block-based checkout adds to the JS asset payload.

“I think this adds at least ~300 kB (compressed) JS payload (initial numbers, my measurement process is still ongoing),” Leho Kraav said.

“We don’t plan to convert our classic theme to a block theme any time soon, but still, I feel uneasy about this direction.”

Florisca followed up on this feedback with a few cursory benchmarks comparing the legacy shortcode checkout with blocks checkout and Shopify:

Blocks CheckoutShortcode CheckoutShopify
Total Payload2.9MB935kb6.1MB
Total Transferred2.1MB1.3MB*3MB
Number of requests14477146

“The number of requests has almost doubled for Blocks, which isn’t great so this is something that we can look into,” Florisca said. “I suspect the reason is because we rely on a few layers of abstraction on top – WooCommerce and WordPress, each with their packages and set ways of doing certain things. We can investigate if we can simply this.”

The discussion on how to improve cart and checkout block performance is still open for more developers to give feedback, and investigations are ongoing. The good news is that WooCommerce maintainers are aware of how much weight the block-based checkout adds and are actively looking for ways to improve it for users.


One response to “WooCommerce Seeks to Improve Cart and Checkout Blocks Performance”

  1. I still does not get the sense behind this great effort to switch to JS based WooCommerce. PHP + AJAX is absolutely fine, it is easily tweaked, the code is readable and much faster. I am not going to switch to WC Blocks but I am afraid sooner or later we will be pushed to do that by WC.
    WC is spending tremendous resources to develop Blocks while having literally thousands (1.8K) open issues in their Github and missing many standard features compared to other platforms which makes every integration much more complicated.


Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.