Home Forums WoodMart support forum Theme sends a lot of requests and makes site slow

Theme sends a lot of requests and makes site slow

Viewing 29 posts - 1 through 29 (of 29 total)
  • Author
    Posts
  • #442068

    AntonIarygin
    Participant

    Good day! We have some issues with the site speed when we are using theme “Woodmart”.

    We had used the theme for a long time and everything was great(speed, settings and so one) before we imported about 17 000 products on our site and lots of attributes for them(for each of product from 5 to 50 attributes). And it made the speed of our site very slow.(screenshot 1)

    So, we was looking for the “center” of the problem with speed for a long time. We had installed such a plugin Query Monitor to see and inspect it by the time we finally found the issue! It was sending(even on pages where it’s not needed) a lot of requests for getting our all about 5000 attributes!!! So, we continued inspecting it and found out that if we return empty array in function wc_get_attribute_taxonomies(screenshot 2) by the path /wp-content/plugins/woocommerce/includes/wc-attribute-functions.php) our site loads fast(screenshot 3).

    So, our question is here: How can we handle it? Could you help us with this annoying problem? We do like this theme! But this bug makes us crazy and we cannot start running our business on time…

    Thanks for advance. Regards

    Attachments:
    You must be logged in to view attached files.
    #442074

    Artem Temos
    Keymaster

    Hello,

    Thank you so much for purchasing our theme and contacting our support center.

    As you can see, the file you mentioned comes with the WooCommerce plugin, not with the theme. But anyway, could you please clarify if you have this problem on all pages? Test how it works on some pages that don’t have any products and let us know.

    Kind Regards
    XTemos Studio

    #442089

    AntonIarygin
    Participant

    I’ve opened a blog page and you can see the results. In the bottom of the page we are using brands slider…but is it supposed to load the page like that?

    Attachments:
    You must be logged in to view attached files.
    #442100

    Artem Temos
    Keymaster

    Please, disable all external plugins not related to our theme and provide us your FTP access. Also, allow us to switch between themes to see if it is caused by WoodMart or not.

    Kind Regards

    #442107

    AntonIarygin
    Participant

    We have only theme-related plugins active.(screenshot-5)
    Yes, you can switch.

    Attachments:
    You must be logged in to view attached files.
    #442111

    Artem Temos
    Keymaster

    Hello,

    We see that Elementor has some query that walks through all taxonomies on your website. When we disable Elementor there is no mentioned problem.

    Kind Regards

    #442132

    AntonIarygin
    Participant

    Okay, I see. But we also installed the theme on another domain and chose WP Bakery as a builder. And we have the similar speed…
    Refer to Private content

    #442465

    Artem Temos
    Keymaster

    Hello,

    We don’t see the problem on this website. Could you please clarify how you measure the speed on this website?

    Kind Regards

    #442539

    AntonIarygin
    Participant

    Hello, Artem.

    We use a plugin Query Monitor for checking the site speed and count of queries but you can see it by just loading and clicking through the site pages…it’s very slow!

    Aren’t these problems with the speed on our site? (refer to screenshots)

    • This reply was modified 1 year, 10 months ago by AntonIarygin.
    Attachments:
    You must be logged in to view attached files.
    #442552

    Artem Temos
    Keymaster

    Hello,

    OK, we see that the product page has a lot of queries but they are not generated by our theme. Are we able to switch between themes and compare the number of queries on that page?

    Kind Regards

    #442656

    AntonIarygin
    Participant

    Yes, I you are able to do it.

    #442658

    AntonIarygin
    Participant

    By the way, I sent 3 screenshots form 3 different pages(front, shop and single product) and front page is generated by your theme…

    #442814

    Artem Temos
    Keymaster

    We just tested with the default theme and the number of queries is even higher there. Here is the screenshot https://gyazo.com/0a719741da2798b63689359b1b4af480
    It means that this problem is not caused by our theme but by some of the installed plugins.

    #442856

    AntonIarygin
    Participant

    Hello,

    Okay, I see.
    But only plugins related to your theme are active…(refer to screenshot)

    paxara.co.uk:
    *all tests were on single product page*

    Site speed

    • woodmart theme: 3.35s
    • storefront theme: 1.96s

    Count of queries

    • woodmart theme: 387
    • storefront theme: 1000

    RAM usage

    • woodmart theme: 134 MB
    • storefront theme: 97 MB

    paxara.fr
    *all tests were on single product page*

    Site speed

    • woodmart theme: 3.22s
    • storefront theme: 1.32s

    Count of queries

    • woodmart theme: 2116
    • storefront theme: 833

    RAM usage

    • woodmart theme: 219 MB
    • storefront theme: 113 MB

    *on both sites were active ONLY related to woodmart theme plugins while testing*

    You can test it like this:

    1. Choose woodmart theme
    2. Check site speed, RAM usage and count of queries by Query Monitor
    3. Switch to storefront theme
    4. Check site speed, RAM usage and count of queries by Query Monitor again

    Could you help us to make our site that uses Woodmart theme fast and site speed would be about 1-1.3s?

    Thanks
    Best regards

    Attachments:
    You must be logged in to view attached files.
    #442860

    Artem Temos
    Keymaster

    Hello,

    First, you need to understand why there are so many requests and slow speed with a default theme either. Once you fix this problem, your website will be faster no matter which theme you are running. You can test it without theme-related plugins as well.

    Kind Regards

    #442883

    AntonIarygin
    Participant

    I’ve sent you all testing data where you can see difference with RAM, speed and queries between Woodmart and default theme but you haven’t answered to this information. Why and how it can be happened? Please answer us about this difference, not about plugins and so one.

    I think a lot of queries are connected with Woocommerce plugin, but this plugin is required for our shop. Woodmart theme also makes a lot of huge queries used Woocommerce function wc_get_attribute_taxonomies. What can you say about it?

    #442885

    Artem Temos
    Keymaster

    Of course, there will be some differences. Pages are much different when you test with WoodMart and with other themes because they have different elements displayed.

    Could you please clarify where you found that this function wc_get_attribute_taxonomies is called by our theme so we can check that place?

    #442902

    AntonIarygin
    Participant

    I’ve added debug_backtrace to wc_get_attribute_taxonomies and write it to debug.log
    So, when I switch to Storefront theme I see about 5-7 calls this function but when I switch to Woodmart theme log goes crazy.

    These functions are like called over and over in loop.(even if we don’t use swatches and visual-composer on our site)
    /wp-content/themes/woodmart/inc/functions.php
    wp-content/themes/woodmart/inc/integrations/woocommerce/modules/compare/class-compare.php
    /wp-content/themes/woodmart/inc/integrations/woocommerce/modules/swatches.php
    /wp-content/themes/woodmart/inc/integrations/visual-composer/maps/product-filters.php

    Refer to video(https://www.veed.io/view/0ea9d198-0c9d-4385-94fc-ceeca260a506?source=compressor-sharing)
    Also you can see debug_backtrace on FTP paxara.co.uk in debug.log

    Regards

    #442928

    Artem Temos
    Keymaster

    Thank you for the explanation.

    We opened the debug.log file but don’t see the information as on the video https://gyazo.com/17b21d1a079995bedc656f746e73792f
    Please, let us do the same check as you demonstrated in the video.

    #442932

    AntonIarygin
    Participant

    I guess you saw debug file from paxara.fr
    Sending you FTP access to paxara.co.uk

    #442934

    Artem Temos
    Keymaster

    Yes, you are right and this function is called multiple times. If you want, let us try to comment it all the places so we can see if it affects the performance.

    #442938

    AntonIarygin
    Participant

    Yes, you can.

    #442941

    Artem Temos
    Keymaster

    Yes, it works faster now. Could you please test it from your end?

    Kind Regards

    #442944

    AntonIarygin
    Participant

    Yeah, it looks kinda good. What have you done?

    #442956

    Artem Temos
    Keymaster

    Our theme uses this function to build dropdowns for some options in Theme Settings and metaboxes. So we temporarily removed them.

    #442962

    AntonIarygin
    Participant

    So, how can we fix it on paxara.fr(our main site)?

    Thanks

    #442963

    Artem Temos
    Keymaster

    You need to edit all the mentioned files in your previous reply and replace this function call

    wc_get_attribute_taxonomies

    with this one

    wd_wc_get_attribute_taxonomies

    Then put the following code to the functions.php file in the theme root or the child theme

    function wd_wc_get_attribute_taxonomies() {
    	return [];
    }

    Kind Regards

    #443008

    AntonIarygin
    Participant

    Okay, it helps…Thanks.
    Could you tell us about the consequences of these hardcode changes?

    #443144

    Artem Temos
    Keymaster

    You will not be able to select product attributes in places like this in Theme Settings https://gyazo.com/1e65571c9191a9e437bcceda0c5fef8e
    Note that you can temporarily roll back your changes to configure them and then hardcode them again.

Viewing 29 posts - 1 through 29 (of 29 total)