WordPress 2.4 Performance Profiling

If you’ve been following Peter’s weekly digest posts, you can see we’re working hard on the next release of WordPress. One of the main efforts in 2.4 is improving performance. I’ve been busy with xdebug and kcachegrind finding places where we can speed things up. If you have a theme that uses widgets or custom header images, 2.4 should be a good bit faster for you. We found a couple of time-wasting bottlenecks in those areas that are now gone. One scenario was burning up 10% of the total page load time. We reduced that to a fraction of a percent. That’s a nice savings. We’ve also been tweaking the filter/action system to make it as fast as possible. The filter and action hooks are fired off many times per page load so even little savings add up.

Caching is also getting attention in 2.4. We’ve had the object cache for awhile now, but there were some areas of WP where it wasn’t being used. The object cache now caches quite a bit more stuff. If you are using the APC, XCache, or memcached backends for the WP object cache, you will notice a few less database queries in 2.4. We also have an Advanced Caching plugin in the works that caches even more stuff. On many page loads you will see zero queries. If you have a fast cache and want to ease DB load as much as possible, this plugin might be for you.

53 thoughts on “WordPress 2.4 Performance Profiling

  1. hey, greetings from Beijing.

    Actually, I’ve been focus on such problems and pointed them out at WordCamp Beijing.

    I am really glad to see this post, I had translated it into Chinese to tell all the WP users in China 🙂

  2. Ryan,

    Out of interest, do you notice the changes as a user viewing a WordPress site if you’re using a descent host or are they more ‘be friendly to hardware’ style improvements that the general public won’t notice?


  3. I noticed some changes that could increase speed through php scripting modifications but i figure you know what they are on a site earlier today but i cant seem to index that site I found which stated simple corrections to everyday php usage terms

  4. Everything sounds great, but I hope you guys don’t drop more tables.

    A good image upload and control over images and thumbnails is what we need too.

    When do you guys expecto to go out with the 2.4?

  5. Performance improvements are always great to see.

    A bit off-topic but does anyone know if the wordpress team has considered adding functions to improve usability to the default themes? I’m referring to increasing text size, decreasing, as well as fixed width and fluid. Many people i talk to when conversing about sites agree that if these features were in wordpress by default it would be yet another feature that would require future and even current users to take notice.

  6. great news – but if i use the eaccelerator backend and the adv. caching plugin (the new one)and wp supercache (0.4), it seems that they don`t play very well together.

  7. Pingback: Carrero
  8. Finally! Though my blog is still very young and not getting much traffic yet, prevention (from certain server doom) is better than cure 😀

    I’m looking forward to 2.4’s release!

  9. I have eaccelerator on my server, but how do I enable the eaccelerator WordPress backend? And does it work with WP_super-cache?

  10. @aw:Wow..

    I think the speed of WP may be the most difficult problem to be solved…Everyone would like it when it had a good speed… Caching is popular not beacuse it is looking friendly to search engineer but can speed up the WP…

  11. Hopefully at some point WordPress will begin enforcing quality control on its plugins and themes. I have found numerous errors that could have been caught if some simple user testing was performed prior to releasing plugins and themes for download. At this point it seems as though WordPress is more concerned with seeing how many themes and plugins can be realeased instead of ensuring that they meet minimum quality standards. It is my sincere belief if basic testing occurred before releasing them for download WordPress may not have produce so many updates.

  12. Does this mean that there will no longer be a need for the third-party cache plugins, such as WP-Cache?

    And what about finally fixing that bug in Safari 3, which strips out paragraph returns?

    Gene Steinberg

  13. To be honest, while I’m thankful for the performance improvements, I’m a bit more interested in the efforts to revamp the Administration system. How is that effort going? Perhaps a blog update about that is in order…

  14. i think stuff like wp-cache, 1blogcacher or wp-supercache will still be needed (in play with the new adv. caching plugin.. and to make it better, using object-cache.. but it`s an improvement.. i`m running 3 snapshot blogs and the last 2 weeks the changed were quite cool.. 😉

  15. First, thanks for all your work and I’m excited to see the performance improvements you’re working on!

    I do want to second the requests above – could you talk a little about the administration part of WP. Is there an intention or actual work going on to speed that up / further improve the interface?

  16. Is there a difference between Wp-cache (it caches pages?) and the caches you mentioned (object cache?)

    Also, every time I edit properties of an image in the post editor, I get two of them. Is this intended behavior or a bug?

  17. Me either, Jenny… tags just aren’t important enough for my blogging needs, and I’ve been too busy with my day job to worry about it.

  18. Hi Maxim,

    with the object-cache.php (e.g. for apc, xcache or eaccelerator) you can cache it in the ram of the system.. so its sure a little bit faster.. but there are more freaks around who can explain it much better than my little self.. just have a look at php caching modules/extensions like apc or xcache or eaccelerator and follow the link(s) in the blog (upside) here to apc or xcache or search (goog..) for eaccelerator object-cache if you choose/use eAcc for caching.. and mybe for session handling.. and a hint, try the wp-supercache plugin for wordpress and replace wp-cache with the supercache plugin.. seems to be faster on my little machine..

    have a nice day


  19. I’ve moved up to 2.3, my templates made it through, but seem to be getting more spam suddenly, and WP has lost its desire to email me when a comment hits the moderation queue. Apart from that I like it, it is fast and reliable. I really would like additional text features, i don’t mind coding, but point and click is so much easier, lol. Love my WordPress! :^) gene

  20. Can you please, please, please find a replacement for those terrible SELECT UNIQUE queries on page display? That is by far one of the worst sorts of queries from a performance standpoint, and gets significantly worse as the blog gets older and contains more posts. I have a couple of blogs with 5000+ posts that turn to dogs on that single query.

    Think scaling. It should never get harder to get the first 10 posts out of a DB, regardless of how big the DB gets.

  21. we host on a clustered environment and turned gzip on from within wordpress. We also turned it on for all locally hosted js and css files. It made a huge difference in the time the page takes to load.

    Still no fix for slow loading remote servers…

  22. hey, glad to see that you are working on 2.4! I love 2.3 so far and I can’t wait. When will the final version be published…?
    Any huge leaps ahead? Like tagging and automatic update notifications?

  23. To make WordPress leverage your memcached/apc/xcache/eaccelerator backend you need to use a plugin.

    This page has links to plugins for all four:

    Just download the appropriate plugin and copy it as to your wp-content folder, and WordPress will magically speed up!

  24. This is great news! Do you know how this will affect WPMU? It would be great if you worked together and came up with a new release simultaneously.

  25. Now I’m working with WP-Super-Cache, the speed seems to be very great 🙂
    I don’t know what exact will 2.4 bring us, at least, I hope the speed can be as fast as with WP-Super-Cache. However, that fast seems to be enough 🙂

Leave a Reply