I'm using WPML on a WooCommerce site and am experiencing performance issues that appear to stem from repeated database queries, as shown by Query Monitor.
Some of the queries that are repeated multiple times per request include:
SELECT language FROM wp_icl_strings WHERE id = ... LIMIT 1
SELECT value, language FROM wp_icl_strings WHERE id = 0
SELECT * FROM wp_posts JOIN wp_icl_translations ... WHERE language_code = 'da'
These are triggered in multiple places, including:
WPML_ST_String->get_language
WPML_Query_Filter
WPML_Term_Query_Filter
apply_filters('wpml_get_endpoint_translation')
These queries are executed many times per page load and are having a noticeable impact on overall performance.
Could you please advise:
Are there caching mechanisms or filters you recommend to reduce duplicate string and language queries?
Is there a way to preload or cache icl_strings data
Are there any best practices specific to WooCommerce + WPML to minimize query overhead?
Any guidance or optimization tips would be much appreciated.
Best regards,
Symptoms:
Repeated database queries are causing performance issues on the WooCommerce site.
Questions:
Are there caching mechanisms or filters you recommend to reduce duplicate string and language queries?
Are there any best practices specific to WooCommerce + WPML to minimize query overhead?
maio 5, 2025 às 11:39 am
O tópico “[Fechado] Repeated icl_strings and Translation Queries Causing Performance Issues (Query Monitor Report)” está fechado para novas respostas.