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
- This topic has 28 replies, 2 voices, and was last updated 1 year, 10 months ago by Artem Temos.
-
AuthorPosts
-
February 10, 2023 at 3:14 pm #442068
AntonIaryginParticipantGood 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.February 10, 2023 at 3:18 pm #442074
Artem TemosKeymasterHello,
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 StudioFebruary 10, 2023 at 3:56 pm #442089
AntonIaryginParticipantI’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.February 10, 2023 at 4:01 pm #442100
Artem TemosKeymasterPlease, 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
February 10, 2023 at 4:15 pm #442107
AntonIaryginParticipantWe have only theme-related plugins active.(screenshot-5)
Yes, you can switch.Attachments:
You must be logged in to view attached files.February 10, 2023 at 4:20 pm #442111
Artem TemosKeymasterHello,
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
February 10, 2023 at 5:39 pm #442132
AntonIaryginParticipantOkay, 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 contentFebruary 13, 2023 at 10:15 am #442465
Artem TemosKeymasterHello,
We don’t see the problem on this website. Could you please clarify how you measure the speed on this website?
Kind Regards
February 13, 2023 at 3:48 pm #442539
AntonIaryginParticipantHello, 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.February 13, 2023 at 4:02 pm #442552
Artem TemosKeymasterHello,
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
February 13, 2023 at 8:56 pm #442656
AntonIaryginParticipantYes, I you are able to do it.
February 13, 2023 at 8:58 pm #442658
AntonIaryginParticipantBy the way, I sent 3 screenshots form 3 different pages(front, shop and single product) and front page is generated by your theme…
February 14, 2023 at 11:31 am #442814
Artem TemosKeymasterWe 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.February 14, 2023 at 12:35 pm #442856
AntonIaryginParticipantHello,
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:
- Choose woodmart theme
- Check site speed, RAM usage and count of queries by Query Monitor
- Switch to storefront theme
- 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 regardsAttachments:
You must be logged in to view attached files.February 14, 2023 at 12:38 pm #442860
Artem TemosKeymasterHello,
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
February 14, 2023 at 1:41 pm #442883
AntonIaryginParticipantI’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?
February 14, 2023 at 1:48 pm #442885
Artem TemosKeymasterOf 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?February 14, 2023 at 2:17 pm #442902
AntonIaryginParticipantI’ve added
debug_backtrace
towc_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.logRegards
February 14, 2023 at 3:18 pm #442928
Artem TemosKeymasterThank 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.February 14, 2023 at 3:26 pm #442932
AntonIaryginParticipantI guess you saw debug file from paxara.fr
Sending you FTP access to paxara.co.ukFebruary 14, 2023 at 3:33 pm #442934
Artem TemosKeymasterYes, 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.
February 14, 2023 at 3:43 pm #442938
AntonIaryginParticipantYes, you can.
February 14, 2023 at 3:56 pm #442941
Artem TemosKeymasterYes, it works faster now. Could you please test it from your end?
Kind Regards
February 14, 2023 at 3:58 pm #442944
AntonIaryginParticipantYeah, it looks kinda good. What have you done?
February 14, 2023 at 4:08 pm #442956
Artem TemosKeymasterOur theme uses this function to build dropdowns for some options in Theme Settings and metaboxes. So we temporarily removed them.
February 14, 2023 at 4:12 pm #442962
AntonIaryginParticipantSo, how can we fix it on paxara.fr(our main site)?
Thanks
February 14, 2023 at 4:15 pm #442963
Artem TemosKeymasterYou 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
February 14, 2023 at 6:46 pm #443008
AntonIaryginParticipantOkay, it helps…Thanks.
Could you tell us about the consequences of these hardcode changes?February 15, 2023 at 10:12 am #443144
Artem TemosKeymasterYou 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. -
AuthorPosts
- You must be logged in to create new topics. Login / Register