October 24th, 2009
How time is spent on a compex page
The two areas where performance problems with WordPress plugins are most common are custom filters/actions and database queries. WP-Profile is a plugin that helps you find such problems.
Actions and filters
WordPress has an intricate system of actions and filters which is used all over the place: to convert : ) into , to make links clickable and to handle the login procedure are just some examples.
Every action and filter is a hook that allows plugins to call custom functions and easily change or override default behavior. That is very useful.
It also makes it easy to really ruin performance as some common filters are called a hundred times or more for more complex pages, making small inefficiencies add up really quickly. Read the rest of this entry »
October 23rd, 2009
Another new version of Cache Translation Object plugin released.
We need to whitelist which
get_locale() calls we filter:
For the future I’m hoping to get a new filter to use.
October 23rd, 2009
New version of Cache Translation Object plugin released.
The major focus of this release is to handle multi-locale correctly — for example if you have one of the multi-language plugins, or if you use different languages on different installations on same host.
This was actually quite a bit of work to get working correctly for Shared Memory. Shared Memory objects doesn’t actually get deleted until every reference to the object is closed, from potentially multiple concurrent page load. Read the rest of this entry »
October 20th, 2009
A simple tool to benchmark web performance is Apachebench — which comes bundled with the Apache web server. To understand how a system as a whole performs you’ll need something more advanced but to just test how long it takes a page to load it works fine.
The graph above expands on where I started profiling the WordPress regression. I’ve added the full 10 post frontpage and a single larger page — with rather lousy performance — and the work so far to remedy it which looks alot better. Read the rest of this entry »
October 18th, 2009
I’ve been benchmarking stock WordPress today to get performance numbers for the Cache Translation Object plugin. As I had things set up for it I also tested the latest major releases – unmodified, clean installations – and found a 40% regression when going from 2.7 to 2.8.
Update: what I measure here is basically the clean startup time, which doesn’t say what the final effect will be on your site with a real theme, plugins and, you know, actual content.
There is often a battle between features, complexity and performance. This unfortunately natural tendency prevalent among programmers should however not result in such a drastic regression.
Update 2: More on this here.
Read the rest of this entry »
October 16th, 2009
Using WordPress translated to your own language results in a surprisingly large performance cost. In my tests it took twice (or four times!) as long for an unmodified WordPress 2.8.4 start page to load when using a localized WordPress.
Translating a lot of text in an user friendly fashion is hard to do efficiently.
But there are things we can do to make it a lot less painful. Read the rest of this entry »
October 10th, 2009
Consider trying this beta version of the Limit Login Attempts plugin– it should be more or less finished. Please post any problems (or successes).
The major focus of this new version is to protect the user login names of privileged users from discovery. Which, it turns out, is a lot of work to do correctly.
It includes optional restrictions on password reset attempts and new user registrations. The plugin also helps you see and modify the various names WordPress keep for each user. By default WordPress uses the user login name to construct author archive URLs, nickname, displayname and so on.
It also allows you to change the URL name of users. I actually find it rather strange that there is no way to change it in stock WordPress.
Remaining on the todo list: Translations, the readme.txt, some documentation, and some further testing.
Screenshots of new settings: 2.8.4, 2.5
October 10th, 2009
A Deprecated WordPress Plugin.
When working on profiling a WordPress install I found, to my surprice that for a 400 comment post the single most expensive thing was translating smilies to pictures — 55% of time to create the page!
Apart from sending a patch fixing this (which went into WordPress 2.8) I also made a small plugin to use before the new version was available.
It is no longer useful as everyone should be using a modern WordPress version.
It can be found here.
October 4th, 2009
Consider trying this beta version. Please post any problems (or successes).
The major focus of this new version is to hide the username of privileged users. Which, it turns out, is a lot of work to do correctly.
It includes optional restrictions on password reset attempts and new user registrations. It also lists any privileged users whose username as the various names displayed on the blog. Which by default is all of them as WordPress default uses the username to construct author archive URLs, among other things.
Largest missing piece is functionality to modify username (which might possibly be dangerous to do) and “nicename” (which might invalidate previous author archive URLs).