We have just released WPML 4.3.3. Before reporting issues please make sure to update - this version resolves all known issues with the major WPML 4.3 release

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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.

This thread is resolved. Here is a description of the problem and solution.

Problem: What can I do to optimize WPML performance?

Solution: WPML 4.3 version solved the performance issues that some sites experienced. Updating to the latest version of WPML and its add-ons should resolve the problem.

If you are still running into performance problems, first follow our FAQ entry about preventing performance issues with WPML. This FAQ includes a number of simple steps to follow.

In case you want to profile your site's performance and get to the bottom of performance problems, follow the guide for debugging performance problems.

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Bruno Kos 8 months, 3 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
February 20, 2019 at 9:21 pm #3223820

ondrejM-3

Hey there,

we are using WPML for quite some time. But it starts being really slow and we hope you can help us !

With WPML disabled admin page takes about 1-1.5s to load. With WPML enabled it takes 4-8seconds. Not so snappy, right?

We did all the steps you followed in previous topics to people and NOTHING HELPED!!!
Also we see lots of slow queries.

Slow query 1: "SELECT DISTINCT s.id, s.name, s.context, st.status, s.gettext_context, st.value AS tra, st.mo_string AS mo_string, s.value AS orig
FROM wp_icl_string_pages sp
INNER JOIN wp_icl_string_urls su
ON su.id = sp.url_id
INNER JOIN wp_icl_strings s
ON s.id = sp.string_id
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language=su.language
AND s.language!=su.language
WHERE (su.language='cs' and su.url='/wp-admin/edit.php?post_type=shop_order') or (su.language='cs' and su.url IS NULL)" - takes about 0.2seconds

Slow query 2: "SELECT m.meta_value AS currency, COUNT(m.post_id) AS c
FROM wp_posts p JOIN wp_postmeta m
ON p.ID = m.post_id
WHERE meta_key='_order_currency'
AND p.post_type='shop_order'
GROUP BY meta_value" - takes 1.6seconds

There is much more, but those are tiny and take 0,08-9 so that's so so...

We run on VPS, memory limit 256MB, OPCache, PHP7 and is I mentioned above we did all the steps you tried to help and notice to other users we went through all the previous topics.

So you can immediately skip this to 2-3rd tier. Thanks!! We want fast response!

February 21, 2019 at 1:21 pm #3227708

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Thank you for contacting WPML support!

I've read the whole discussion with Lauren and what I gather is this:
- there is no bug (because WCML works properly), but this is rather a performance issue with slow SQL queries
- you were able to identify queries that slow down your site (having millions of rows in database)

What I can do is the following:
- pass the queries you've identified as slow to our WCML team and ask for their opinion about this (feel free to send here all the queries you consider responsible for the slow performance)
- due to EU GDPR laws, we can't do the testing on your database and that is understandable

What happens next:
- our second tier will examine queries you found as slow
- if needed, they will rewrite SQL queries and implement them into next releases

Being a software engineer yourself, you will appreciate the fact that issues like this one cannot be resolved today, since there are strict procedures on how this goes with any type of development (dev, betas, q/a, testing, etc) in fact. Moreover, I can't give you any dates - It could end up in the next release or in 6 months. This is totally up to developers - severity of the issue and number of reported cases (among other things) decide its queue on the list.

Please read the Support Policy about this:
https://wpml.org/purchase/support-policy/

"Fix Bugs in WPML
This one may sound strange, but it’s true. If you find a bug in WPML, we take it very seriously. We’ll add it to the bug-fix queue and work on it. However, we can’t fix everything right that minute. So, if you hit a bug that’s keeping you from doing something, we can’t promise that we’ll fix it right away.

We’ll work with you to find a sensible temporary solution and will let you know as soon as it’s fixed, but we can’t guarantee any schedule."

Regards,
Bruno Kos

February 21, 2019 at 3:25 pm #3228484

ondrejM-3

Hey there,

I know what you mean but please take a look at these.

"SELECT DISTINCT s.id, s.name, s.context, st.status, s.gettext_context, st.value AS tra, st.mo_string AS mo_string, s.value AS orig
FROM wp_icl_string_pages sp
INNER JOIN wp_icl_string_urls su
ON su.id = sp.url_id
INNER JOIN wp_icl_strings s
ON s.id = sp.string_id
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language=su.language
AND s.language!=su.language
WHERE (su.language='cs' and su.url='/wp-admin/edit.php?post_type=shop_order') or (su.language='cs' and su.url IS NULL)"

"SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM wp_icl_strings s
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language='cs'
AND s.language!='cs'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 2000"

"SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM wp_icl_strings s
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language='cs'
AND s.language!='cs'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 3000"

"SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM wp_icl_strings s
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language='cs'
AND s.language!='cs'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 4000"

"SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM wp_icl_strings s
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language='cs'
AND s.language!='cs'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 5000"

SELECT s.id, st.status, s.domain_name_context_md5 AS ctx , st.value AS translated, st.mo_string AS mo_string, s.value AS original, s.gettext_context
FROM wp_icl_strings s
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language='cs'
AND s.language!='cs'
WHERE s.context = 'default'
LIMIT 1000 OFFSET 6000"

Tons of these out there.

Any clues? We already have query_cache on, 1024MB memory limit and will try to implement Redis

February 21, 2019 at 3:39 pm #3228554

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Can you tell me if this is disabled (should be on production sites)?
https://wpml.org/documentation/getting-started-guide/string-translation/#track-strings

Queries I see here are related to String Translation. As for the general speed, our developers are always evaluating how SQL queries work and there will be major improvements for this in WPML 4.4 (I can't give you any information related to release date, though). I believe that it will also include changes on how String Translation works.

Other than than, I am not sure if I can give you any suggestions at this point, as this is a performance issue and how WPML works by default, rather than a bug. I do not think it would make sense to send all the queries WPML produces to our developers for reevaluation.

What I can is to to encourage you the following - if you have the know-how on how to write custom queries that do the job better or faster, I definitely suggest you do that and then either:
- https://wpml.org/suggest-a-new-feature-for-wpml/
- update this thread with potential improvements so that our team can test them - it wouldn't be the first time that our users sent us new/better queries we implemented after through testing

Regards,
Bruno Kos

February 21, 2019 at 7:34 pm #3229765

ondrejM-3

Yes it was disabled except some plugins.

What we actually did we've made some improvements on our own that are non-update deletable. The site is now blazin' fast again.

1) Optimized settings of OPCache
2) Changed wp_postmeta value from 255 varchar to 191 only
3) Deleted all translations from database and load them straight from .po/.mo files
4) Indexed database tables with translations and links that remain there
5) Updated memory limit to 2048MB
6) Implemented Redis

With millions of records - okay, loads up to 1.5sec.
Tomorrow I will import many more orders on staging copy using WC Smooth generator.

Should be ok.

February 22, 2019 at 8:30 am #3231355

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

That sounds like a great news - based on that, can I be of any further assistance at this point?

Regards,
Bruno Kos