Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

WooCommerce Blocks load MUCH slower than classic WooCommerce Widgets #7759

Closed
apenchev opened this issue Nov 25, 2022 · 2 comments
Closed

WooCommerce Blocks load MUCH slower than classic WooCommerce Widgets #7759

apenchev opened this issue Nov 25, 2022 · 2 comments
Labels
focus: performance The issue/PR is related to performance. type: bug The issue/PR concerns a confirmed bug.

Comments

@apenchev
Copy link

Describe the bug

The WooCommerce blocks have been a terrible experience for our store, as they avoid page caching and use the slow WordPress REST API – each REST API call takes around 1.8s; hacking WP REST Cache to work with WooCommerce was not enough to make the fetch response time reasonable. The classic WooCommerce widgets, on the other side, are way faster – they don’t rely on the REST API and work with page caching. Would love it if the blocks had an option to avoid using the REST API! That would combine the best of both worlds.

To reproduce

Steps to reproduce the behavior:

  1. Install WooCommerce: https://wordpress.org/plugins/woocommerce/
  2. Create a Page with the following blocks: Product Categories List, Filter by Price, All Products
  3. Save & Publish the Page
  4. Install the Classic Widgets plugin: https://wordpress.org/plugins/classic-widgets/
  5. From /wp-admin/widgets.php, add the following Widgets: Product Categories, Filter by Price
  6. Create & Publish a new empty Page (that will be used as the WooCommerce's Store Page)
  7. From /wp-admin/admin.php?page=wc-settings&tab=products, change the Products Page to be the page from step 6.
  8. Now, compare the loading times and perceived performance of the pages from step 6. and step 2.

Expected behavior

WooCommerce blocks should render the same way the WooCommerce Widgets do.

Screenshots

I've added videos from our website (which uses cheap shared hosting) showcasing the big difference in loading times.

Environment

WordPress (please complete the following information):

  • WordPress version: 6.1.1
  • Gutenberg version (if installed): not installed
  • WooCommerce version: 7.1.0
  • WooCommerce Blocks version: not installed
  • Site language: Bulgarian

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 107
blocks.mp4
classic-widgets.mp4

fetch

@sunyatasattva
Copy link
Contributor

Hello @apenchev ! Thank you for the report and I'm glad you, for the most part, like the block experience.

We are working on the performance and exactly what you are mentioning by creating blocks that are server-side rendered and do not make API requests on the first page load.

We are going to have a new “Products” block using this approach coming out as a feature plugin-only beta in the next few weeks, and we are looking forward to any feedback of merchants such as yourself.

Please do try this new block yourself and provide your feedback at this link.

We are really listening and your feedback is very valuable.

For the time being, I'm closing this issue as it is something we are already working on and we have more specific issues.

@nerrad nerrad added the focus: performance The issue/PR is related to performance. label Nov 30, 2022
@Aljullu
Copy link
Contributor

Aljullu commented Dec 5, 2022

Heads-up that we created this issue to track converting filter blocks to server-side rendering: #7844. Not something we plan to work immediately, but noting it's in our roadmap.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: performance The issue/PR is related to performance. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

4 participants