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 4 replies, has 2 voices.

Last updated by Amber Martin 5 years, 5 months ago.

Assigned support staff: Amber Martin.

Author Posts
April 29, 2014 at 6:19 pm #390324

Richard

Last month or so I submitted some speed optimizations for WPML. I was told some of these would be implemented. I've upgraded to 3.1.5, and found that they were not.

I've re-implemented my changes again 3.1.5, and reduced CPU usage, DB usage again for my installation.

If possible, please consider making these changes in the next release.

Please do a diff for the file sitepress.class.php to find my changes.

My changed file is here:

http://pastebin.com/LJs5q31Y

I'm including two screenshots from P3 Plugin Profiler, to show the speed gains that can be attained.

The greatest improvements comes from a very minor change to

function check_settings_integrity

It avoids doing 2 DB queries (1 very costly), which is done multiple times, almost on every load of the plugin.

The other changes, are to properly cache 2 queries in 2 other methods, that are not being cached in certain scenarios (they are never being cached in my installation under the stock 3.1.5.).

Thanks,
Rich

April 29, 2014 at 7:39 pm #390383

Amber Martin

Hello,
I will send this to our developers to review and will get back to you as soon as I can.
Thanks,
Amber

April 29, 2014 at 11:10 pm #390490

Richard

Ok great.

I just uploaded a new image, because I realized I showed detail on the wrong plugin. In any case, I'm thinking that P3 Profiler is not totally accurate as I get different numbers, every time I run it (I'm thinking its attempt to avoid page cache are not succesful).

In any case, I hope this provides some data.

Rich

April 29, 2014 at 11:14 pm #390491

Richard

For reference,

Here is my previous post.

http://wpml.org/forums/topic/possible-speed-optimizations/

April 30, 2014 at 1:00 pm #390987

Amber Martin

Hello,
Thank you, I have that. I will let you know as soon as i have some feedback.
Thanks,
Amber

The topic ‘[Closed] Speed Optimizations in 3.1.5’ is closed to new replies.