[Resolved] Duplicated WPML queries on product pages
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing a high number of duplicate queries on product pages, mostly originating from WPML, and is concerned about the impact on site performance. Solution: We analyzed the situation and found that while WPML and WooCommerce Multilingual contribute to some duplicate queries, the impact on performance is minimal (less than 5 ms). Most of the performance issues are caused by the lightspeed-cache plugin, which adds significantly more delay (31 ms). We recommend focusing on optimizing or configuring the caching plugin to reduce its overhead. Additionally, our developers are continuously working to optimize WPML, with significant improvements expected in the upcoming version 4.7. For further details, please check the performance analysis image here: performance analysis image.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also advise checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Hey I sill have these problems. I did all things you said
I installed Query montor and I see most of the querries are from wpml, also I have 80 dublicated querries on product pages, most from WPML. This is not normal.
New threads created by Bigul and linked to this one are listed below:
Welcome to the WPML support forum. I will do my best to help you to resolve the issue.
I created a new ticket for this for the easy follow-up. Because this requires further checking.
Please fill the private details fields after a full site backup. I would like to access the admin area of your staging site for further checking. Refer to the following links for more details about our private information sharing policies.
I conducted a few rounds of testing on my local copies. In a minimal setup (when the WPML plugins, WooCommerce, and Kadence theme are only active), Query Monitor is showing fewer than 5-6 duplicate queries related to WPML. Therefore, I am consulting with our team for an expert opinion. We will get back to you as soon as possible. Please wait.
Please note that the ticket is forwarded to our second-tier team for further checking. Becuase as of now this is a kind of expected result, the number of queries related to WPML increases if we have many plugins, custom post types, taxonomies, etc..
Also, the upcoming version of WPML(4.7) has a lot of performance improvements. We will get back to you as soon as possible. Please wait.
1. The update wont fix this you always tell me the next update will fix it..
2. Please tell me exactly what I can do to minimize queries and dublicated queries of wpml
Our developers have identified a few duplicate queries (we tested in your staging site also), particularly on the translated pages, but the overall number is small, and each query takes less than a millisecond.
The main issue is 8 calls by WC_Data_Store_WP->read_meta(), which take a total of 2.3 ms, with 6 of those coming from the WooCommerce Multilingual plugin. Some queries may also originate from third-party code, like Kadence product blocks. While some of these queries are triggered by different functions, they result in similar SQL queries. Therefore if there are specific queries you’d like us to focus on, please let us know.
Additionally, we have observed that the lightspeed-cache plugin adds 31 ms by fetching options repeatedly, compared to only 2.875 ms added by WPML. Some duplicate entries are unavoidable, such as those involving WPML and WooCommerce. Even when including all duplicate queries, the total remains under 5 ms, which is much less than the 31 ms from lightspeed-cache, and neither has a noticeable impact on performance.
Please check the attached image for more details and let us know if you have any specific areas you want us to investigate further.
Thank you for the updates. Please check the following image. 284 queries are coming from the WooCommerce plugin. WPML handles the translation of posts, taxonomies, and strings, so it is normal to see many queries related to site translation. The number of queries depends on factors like the number of plugins, the size of your site, and how feature-rich your theme is.
hidden link
Currently, there is no single solution to reduce the number of queries. However, if there are specific queries you'd like us to address, please let us know. Our developers are actively working to improve WPML's overall performance, and you can expect major updates in version 4.7.
the problem is when WPML is active the website saves pages very slow and deleting make my website crash something is still wrong and its comming from wpml
New threads created by Bigul and linked to this one are listed below:
Thank you for the updates. I have created a new ticket for easy discussion of both issues. It will help us to avoid discussing multiple things in a single ticket.
I will get back to you soon with the latest ticket. Please wait. Thank you for your kind understanding.