Skip navigation
Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 12:00 – 16:00 -

Часовой пояс сторонника: Europe/Zagreb (GMT+02:00)

Эта тема содержит 0 ответ, имеет 1 голос.

Последнее обновление: jonasP-14 1 месяц назад.

При содействии: Dražen.

Автор Записи
5 мая, 2025 на 11:01 дп

jonasP-14

Background of the issue:
Hi WPML Support,

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)' закрыта для новых ответов.