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.

This topic contains 11 replies, has 2 voices.

Last updated by Christian Cox 5 years ago.

Assigned support staff: Christian Cox.

Author Posts
December 29, 2016 at 6:44 pm #1170988

solonH

I am trying to: Find out why my site has bad performance (loads very slowly).
1) Some test I ran with P3 Plugin Profiler show that WPML String Translation takes around 2 seconds to load.
2) I also saw from Pingdom that ?wc-ajax=get_refreshed_fragments also takes another 2 seconds to load and from what I have seen in forums this is used my Woocommerce and WPML.

URL of (my) website where problem appears: hidden link

I expected to see:

Instead, I got:

Steps to duplicate the issue:

December 29, 2016 at 8:44 pm #1171042

Christian Cox

Hi Solon, thank you for contacting WPML support. I understand that your site is loading slowly and your performance profiler has indicated that WPML is partially to blame. I'll be glad to help you with this today.

1. Please make a backup of your site database and files before proceeding.
2. Can you confirm the site is still loading very slowly if you temporarily switch to a default theme, like Twenty Sixteen?
3. Can you confirm the site is still loading very slowly whether or not you are logged in to the WordPress admin?

December 29, 2016 at 9:19 pm #1171064

solonH

Hi Christian,

1. Done
2. It loads much faster with Twenty Fifteen. In about 1/3 of the time it takes to load with my regular Theme.
3. Confirmed.

Thanks.

December 29, 2016 at 9:33 pm #1171067

Christian Cox

Thanks for the update. I would like to run some performance tests on a copy of your site to see if modifying some configurations will help your speed issue. Do you have a staging or test environment set up? If you don't have a testing environment available, please make a snapshot of your site using the Duplicator plugin: https://wordpress.org/plugins/duplicator/. This will allow me to set up your site locally and run these tests for you.

Once the snapshot is complete, either upload the snapshot ZIP file and the installer.php file to a file sharing service such as Dropbox (and share the link in your reply) or right click the Duplicator links in your wp-admin and paste in your reply. I will also need the username and password of a user that was created before the duplicator package was created.

Please note: It is important to reduce the size of the package so please exclude some paths like /cache or /uploads and also exclude archives and media files.

December 30, 2016 at 8:33 am #1171207

solonH

Hi,

I have everything you requested. However, please suggest a secure communication channel so I can send them to you.

Thanks.

December 30, 2016 at 1:55 pm #1171432

Christian Cox

Hi I have enabled a private reply field for you. The next reply you send will only be accessible by you and me.

December 30, 2016 at 5:30 pm #1171585

Christian Cox

Thank you Solon, I have downloaded the files and installed locally. I will run some tests and get back to you shortly.

December 30, 2016 at 8:59 pm #1171706

Christian Cox

Solon, I have some results for you. Instead of using P3 profiler, I am using a plugin called Query Monitor, as it gives more detail into the actual database calls that are causing delays and bottlenecks. https://wordpress.org/plugins/query-monitor/

In my test I loaded up 4 different pages of the cloned site several times. I ran the query monitor each time, and recorded a typical summarized query by component results on this spreadsheet:
hidden link

The important thing to note here is relative times. On two of the pages I tested, WPML is not the most time-consuming process. On the two pages where I see WPML String Translation is the most time-consuming process, it is not an order of magnitude slower than js-composer or wordpress-seo. So I don't think that P3 is doing a fair comparison, especially for a logged-in user.

Note the page load times on the second sheet - when I deactivated WP Bakery VC plugin. Dramatically lower on the home page. This would indicate that WP Bakery VC plugin could be better optimized for internationalization.

That being said, there are some things you can do to improve performance. Here is an article in our forum:

http://wpml.org/2012/01/can-your-site-run-faster/

Most importantly, read the Page Caching section. Installing and configuring a cache plugin can dramatically speed up your site, especially for users who are not logged in. Don't pay attention to the Debug Queries plugin mentioned here, as it has not been updated by its author and is not compatible yet with WP 4.7. I prefer the Query Monitor plugin.

I hope this helps you get your site running as fast as possible!

January 1, 2017 at 6:21 pm #1172031

solonH

Hi Christian,

Thank you for the detailed analysis. I may be missing something, but it looks to me that the maths don't add up. For example in the excel sheet where you loaded the Homepage, if you add the times of all the individual components they are less than a second. However, the page took 9.75 seconds to load! Query monitor doesn't show what the server was doing during those 9 seconds. At least with P3 if you add the individual components' loading times, the sum is around the loading time. So, it seems P3 is more realistic.

As for the WP Bakery VC, my Theme is dependent on that plugin so I cannot disable it. Is there something I can do about that? Are you planning, as a company, to resolve the incompatibility of WPML and WP Bakery VC?

Regarding improving the performance I indent to install W3 Total Cache as soon as they release a version compatible with WP 4.7.

What about my second point:
"I also saw from Pingdom that ?wc-ajax=get_refreshed_fragments also takes another 2 seconds to load and from what I have seen in forums this is used my Woocommerce and WPML."

Thanks,
Solon

January 3, 2017 at 3:49 pm #1173614

Christian Cox

Hi Solon,

The numbers do not add up to the page load time, that is true. Database queries are only one factor that determine the total page load time, and these are only the longest running database queries. The spreadsheet I put together does not address other concerns like PHP processing time, server latency, or the overhead cost of analyzing everything with query monitor. P3 seems to include other information, but does not really specify where that information comes from.

"...?wc-ajax=get_refreshed_fragments also takes another 2 seconds to load..."
Regarding this URL, I was only able to see it in one instance, and that was after adding an item into my cart. The page reloads, and then this AJAX call is made. Attaching screenshot of that network diagram. As you can see there, the AJAX request does not block the rest of the page from loading. This request does not cause your page to load slowly...it's made in the background.

Great plan on the caching tool, I think this will get your homepage loading super fast.

As far as I can see, the WP Bakery VC plugin is not listed in our compatibility list: http://wpml.org/documentation/plugins-compatibility/

We can suggest the plugin's author to join our Go Global Program (https://wpml.org/documentation/theme-compatibility/go-global-program/). You can either contact them directly or provide us their contact details (name + email) so we can get in touch with them.

Since compatibility typically depends on development from both sides, this timeline is dependent on both parties collaborating.

Screen Shot 2017-01-03 at 10.25.47 AM.png
January 4, 2017 at 1:40 pm #1174327

solonH

Hi Christian,

Thank you for the detailed explanation. No need to contact the plugin's author. I need something now and I cannot afford to wait for months until they resolve the issue.

Is it just WPML String translation that is incompatible with WP Bakery or WPML in general? If it is the former, do you think I can disable string translation and use the other method WPML uses?

Thanks.

January 4, 2017 at 4:05 pm #1174541

Christian Cox

I understand about the time restraint. Is it possible to find a caching plugin that works with WP 4.7 quickly that can serve in the meantime? It may not be the best long term solution but hopefully W3 Total Cache will release an update soon that is compatible with 4.7 and you can switch to that later.

Hard for me to say about the compatibility issue, this is something that our developers would need to research and isolate when the other author agrees to collaborate. You can certainly try disabling String Translation temporarily to see how much of your site is untranslated. You can use .mo files to translate strings that are encoded in your theme and plugin PHP files, but some dynamic text strings will be untranslatable because they are stored in your database and not hard-coded in the code.