I’ve been doing some Xdebug profiling on LightPress to ensure that speed is properly balanced with memory usage, thanks to some tips from Sencer. While I was at it, I thought it might be fun do a few profiles on my WordPress development site.
Xdebug offers numerous profiling modes, but the one I’ve used here is the “Total Execution Time” (4) profile which sums the excution time for each function call and lists functions in descending order. E.g. if the function apply_filters is called 10 times, the total will show the sum of the 10 separate calls (note that further calls made within a function count do count towards its total). This is a useful profile to determine which functions make up the bulk of WordPress processing time.
(more...)
After a complete rewrite, I’m pleased to announce the release of PreFormatted 2.0 beta. This is a plugin for WordPress 1.5 that reduces page rendering time by pre-formatting post content, excerpts and comments when they are saved to the database rather than formatting them every time a page is viewed. The original version of PreFormatted (primarily developed for the WPFF/LightPress project) suffered from a few design limitations but these have been eliminated in version 2.0.
The highlights:
- “Pre-formatted” data is now saved to the database separately from the original data.
- Generates pre-formatted data when unformatted content is viewed for the first time.
- Compatible with other formatting plugins such as Markdown and Textile.
- Extends LightPress formatting by allowing the above to be used. Note that a LightPress plugin (to be released soon) is required.
For more information please visit the PreFormatted plugin page.
Special thanks go out to Denis de Bernardy who provided numerous suggestions, testing and a patch or two. You can see PreFormatted 2.0 in action on both his site and mine.
My host moved this site to a new server the other day, so hopefully everything made it over in one piece. It was amusing to get e-mails about new comments being posted despite the fact that I couldn’t access the new server myself (DNS issue with my ISP). So if I haven’t responded to your e-mail or your comment has disappeared, please let me know.
PreFormatted 1.0 Released
The newest PreFormatted release is now online and includes some minor fixes. Specifically, a few filters had to be tweaked due to changes in the official Strayhorn release. I also added a fix for a common WordPress problem: wpautop() likes to place your <!--more--> and <!--nextpage--> tags into their own paragraph blocks. This produces invalid XHTML when your post gets split into multiple pages. PreFormatted will remove the offending tags when possible.
I have many features planned for the next release, including keeping a copy of posts in their original format. I’ve been using Markdown lately (on another project) so expect PreFormatted to play nicer with other formatting plugins — my strategy should allow it to detect which filters need to re-arranged automatically.
Jerome’s Keywords — Roadmap
Thanks again to everyone who has sent me feedback about this plugin. As mentioned in a previous comment thread, there is an alpha of version 1.5 that can be used to create a tag cosmos. I plan to release 1.5-final in the next few days, which will add a “top X” (insert your number here) keyword list and will fix the way category meta keywords are handled.
I suspect that the new features of 1.5 won’t scale very well for heavily used sites, so the next major release (2.0) will move to a different storage scheme. Don’t worry, the conversion will be painless and completelybehind the scenes. The plan also calls for an options page for easier customization.
I’ve just finished the beta version of the “PreFormatted” WordPress plugin. Basically, it stores posts & comments in their final, formatted form rather than processing them every time a page is loaded. It provides only a modest decrease in page rendering times, but that’s not it’s real purpose anyway.
WPFF lacks some of the nicer features of WordPress, including polished post formatting. But if the WordPress back-end pre-formats everything, then WPFF size and speed can be maintained without any extra cost! So this really is a WordPress plugin that makes WPFF look nicer. The bonus is that you can use it even if you don’t use WPFF…
I just switched on the new plugin today - this is the first post to use it. You can learn more on the new PreFormatted plugin page.