I am reposting this comment I made over on the “Ideas” forum:
(Note that a few things may have changed in 2.5.x, but the general speed issue with wpautop still exists. Just give this a whirl and see if it speeds things up for you. It did for me.)
“One quick way to speed it up a good bit is to comment out the ENTIRE innards of the function “wpautop” in /wp-includes/formatting.php. It contains about 20 regular expression (regex) matching/replacing calls, each on potentially the entire post content for e.g. each post on the blog index page.
Regex is resource intensive, and this can be 200 such calls for someone that has e.g. 10 posts showing.
[Also note that since wpautop is called for every comment_text, on the single.php “single-post view” screens it will slow things down as well if you have a good number of comments.]
Here is the line in default-filters.php that does this call:
add_filter(‘the_content’, ‘wpautop’);
1) It’s really not necessary to do what amounts to a syntax check EVERY TIME the post gets displayed. If anything, call it on update… if you must…
2) In general, I have found 0 adverse effects from cutting out this entire function that is rummaging through and trying to correct your HTML (and there are a few unintended errors in there where some of the “greedy operators” run amuck and replace valid div tags with p tags, stripping put valid embeds on etc. when using the post editors, which is what first alerted me to this function).
Everything seems to work faster and better…
If people use the editor, they can’t really screw up the HTML compliance too badly anyway, if they use hand-coded inserts, etc. just let them be… if they screw things up, that’s their problem… and they’ll likely know right away anyway…
(end of reprint)
Long story short:
Comment out ALL of “wpautop” function in /wp-includes/formatting.php except the “return $pee;” line
See how it’s running on one of my blogs, response time is usually good even though it’s pretty graphics heavy on first load. Running on Bluehost.com
https://businessmindhacks.com/