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?
5 мая, 2025 на 11:39 дп
Тема '[Закрытые] Repeated icl_strings and Translation Queries Causing Performance Issues (Query Monitor Report)' закрыта для новых ответов.
Управление согласием на использование Cookie
Мы используем cookies для оптимизации нашего сайта и услуг. Ваше согласие позволяет нам обрабатывать такие данные, как поведение при просмотре. Отказ от согласия может повлиять на работу некоторых функций.
Функциональный
Всегда активен
Это необходимо для корректной работы нашего веб-сайта.
Предпочтения
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Статистика
Мы используем их для анализа статистики нашего сайта. Собранная информация полностью анонимна. Техническое хранение или доступ, используемые исключительно для анонимных статистических целей. Без повестки, добровольного согласия вашего интернет-провайдера или дополнительных записей третьих лиц информация, хранящаяся или извлекаемая для этой цели, обычно не может быть использована для вашей идентификации.
Маркетинг
Эти cookies отслеживают Ваш просмотр веб-страниц, чтобы предоставлять релевантную Вам рекламу.