[wp-hackers] Posting still slow

Robert Deaton false.hopes at gmail.com
Wed Aug 31 04:12:47 GMT 2005


This is more along the lines of what I was thinking. I didn't test
extensively, but it does seem to cut off even more time posting. I
don't have mod_gzip enabled, and that will probably always be a
problem since no matter what you do apache waits until the end to send
output.

Index: wp-includes/functions-post.php
===================================================================
--- wp-includes/functions-post.php      (revision 2832)
+++ wp-includes/functions-post.php      (working copy)
@@ -154,6 +154,7 @@
 
        if ($post_status == 'publish') {
                do_action('publish_post', $post_ID);
+               register_shutdown_function('flush');
                if ($post_pingback)
                        register_shutdown_function('pingback',
$content, $post_ID);
                register_shutdown_function('do_enclose', $content, $post_ID );  

On 8/30/05, Matt Mullenweg <m at mullenweg.com> wrote:
> Robert Deaton wrote:
> > A couple people also noted that it looks like some pings are still
> > being sent before the page is output. Perhaps an implicit buffer flush
> > before we start the pingbacks and trackbacks would guarantee that the
> > page shows up before the pings are sent.
> 
> I just removed a buffer flush that seems to have been causing posting
> errors.
> 
> > A few other noticable problems that would make it slow still is
> > enabling gzip compression. Since it waits until everything is finished
> > and then compresses, even pingbacks and trackbacks have to be sent.
> > Perhaps disabling gzip compression in the admin section would also
> > speed things up considerably.
> 
> We already do for the built-in compression, I believe, but we can't do
> anything about mod_gzip without adding a .htaccess that may or may not work.
> 
> --
> Matt Mullenweg
>   http://photomatt.net | http://wordpress.org
> http://pingomatic.com | http://cnet.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 


-- 
--Robert Deaton
http://somethingunpredictable.com


More information about the wp-hackers mailing list