Slow Backend / Disable Woocommece Blocks
-
Dears,
When loading pages like:
-wp-admin/edit.php?post_type=product
-wp-admin/edit.php?post_type=shop_orderThe loading time was around 5-9 seconds. So I installed a plugin to check actions and filters execution time.
Found out:admin_print_footer_scripts Automattic\WooCommerce\Blocks\Assets\AssetDataRegistry::enqueue_asset_data (1) plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php
was taking 2 seconds.
woocommerce_shared_settings Automattic\WooCommerce\Blocks\Assets::get_wc_block_data (1) plugins/woocommerce/packages/woocommerce-blocks/src/Assets.php
was taking another 2 seconds
rest_api_init Automattic\WooCommerce\Blocks\RestApi::register_rest_routes (1) plugins/woocommerce/packages/woocommerce-blocks/src/RestApi.php
was taking 1.5 seconds
So I went to
/stage.chilevapo.cl/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php
and commented:protected function init() { //add_action( 'init', array( $this, 'register_data_script' ) ); //add_action( 'wp_print_footer_scripts', array( $this, 'enqueue_asset_data' ), 1 ); //add_action( 'admin_print_footer_scripts', array( $this, 'enqueue_asset_data' ), 1 ); }
Et voilá, previous pages started loading in 2.5-3 seconds.
Could you explain why is this happening?
Is there any other way to make Woocommece faster avoiding having to edit its code?
What would I break with this code edition?Best regards,
Wordpress: 5.6.1
Woocommece: 5.0.0
Server: Openlitespeed, VPS 1 CPU, 3 GB RAM
Php: 7.3The page I need help with: [log in to see the link]
- The topic ‘Slow Backend / Disable Woocommece Blocks’ is closed to new replies.