Skip Navigation

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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 7:00 – 12:00 -
- 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 13:00 – 16:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 0 replies, has 2 voices.

Last updated by Lucas Vidal de Andrade 12 hours, 9 minutes ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
November 20, 2024 at 12:39 pm #16424629

ivanS-69

Background of the issue:
I am trying to optimize our site's performance and noticed a slow query from WPML's Media Translations feature while using MySQL slow query logging on RDS. The query is consistently flagged for performance issues. Running this query on our staging server results in a timing of 7.6 seconds. I explored potential improvements such as query result caching, improved indices, and replacing the JOIN-based query with a nested WHERE statement, which reduced the time to ~1.9 seconds.

Symptoms:
The SQL query executed by WPML Media Translations has a large performance overhead, taking 7.6 seconds to run and examining around 890k rows.

Questions:
How can I optimize the performance of WPML Media Translations SQL queries?
Can you work on optimizing WPML performance for larger sites?

November 20, 2024 at 2:34 pm #16425154

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Please share your debug information with us. This way, we can better understand how WPML is running. You can check the details on how to achieve that here:
https://wpml.org/faq/provide-debug-information-faster-support/

November 21, 2024 at 12:10 pm #16428830

ivanS-69

Please obtain debug info from here: hidden link

November 21, 2024 at 3:22 pm #16430002

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you so much for sharing. I'm getting a second opinion with our developers and will get back to you as soon as I hear from them.

November 22, 2024 at 3:16 pm #16434462

Lucas Vidal de Andrade
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

I checked with our devs and there isn't much we can do without access to a copy of your website.

"We need the means of reproducing this issue. I am not aware which action exactly is doing this request.
Debugging performance issues requires at the least minimum the steps and an environment or idea of such an environment that this can be reproduced in.
So first tell me the exact steps that I can try so that I can even start tracing this, then a Duplicator will be best solution - as it is possible that either custom code or something from a 3rd party plugin is triggering this.

By "an idea of such an environment" I mean - list of possible plugins, custom code and/or themes along with number of contents.
Yes the number of contents in a mysql table play a pivotal role and a query which executes normally for 0.0001sec on a clean environment may execute for a second on an environment with a milion rows or so. It all depends on the SQL query."

Please check internally if you can provide us with a copy. Our privacy policy is here:
https://wpml.org/documentation/privacy-policy-and-gdpr-compliance/

As I said, you can remove any sensitive information from the copy, if you prefer. Without seeing the issue, we likely cannot fix it.