[wp-hackers] Re: Very slow comment posting

Robert R. Marsh, SJ rmarshsj at hotmail.com
Fri May 9 09:45:03 GMT 2008


That's the strange thing: (with caching disabled) the page takes ages to
load after a comment (the footer comment shows about 50 queries and 50
seconds!) has been made but NOT at other times.

Rob

> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com 
> [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of 
> Alexander Beutl
> Sent: 09 May 2008 10:05
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Re: Very slow comment posting
> 
> If your theme doesn't allready have that in its footer.php 
> file you could add <?php echo get_num_queries(); ?> queries. 
> <?php timer_stop(1); ?> seconds.
> (maybe as a html comment, if you're able to view them without 
> reloading that page (which some browser do when you hit view source)
> 
> If this time is huge you'll the problem comes from the 
> generation of the page itselfe and not from posting the comments.
> 
> Does the WP installation use something like WP Super Cache?
> This would definitly mean the page is generated when you post 
> a comment while it isn't when you don't.
> 
> 
> 2008/5/8 Robert R. Marsh, SJ <rmarshsj at hotmail.com>:
> 
> > Timing reveals that the bottle neck is not in 
> wp-comments-post.php -- 
> > 0.2s out of about 40s. So the holdup must be in the 
> redirection/reload.
> >
> > Any clues, guys?
> >
> > Rob
> >
> > > Ok - here is an idea how to find it:
> > > First check the wp-comments-post.php.
> > > Do the following:
> > > before wp_redirect_location($location); (at the very end of the 
> > > file) add
> > > if(get_option('mytimer')) update_option('mytimer',timer_stop(););
> > > else add_option('mytimer', timer_stop(), '', 'no');
> > >
> > > then go to you phpMyAdmin (or whatever you use) and inside the 
> > > options table look for the option mytimer.
> > > this will be the time it took for going through the 
> > > wp-comments-post.php.
> > > Then you will know if the bottleneck is inside this file.
> > >
> > > If so move the lines up and up and up until the time is 
> reasonable 
> > > again.
> > > Then you will know where that bottleneck is.
> > >
> > > At least this is what I would do.
> > >
> > > 2008/5/8, Jamie <intoxination at gmail.com>:
> > > >
> > > > Austin Matzko wrote:
> > > >
> > > > > Perhaps it's slowed in the wp_allow_comment function 
> as it looks 
> > > > > through 150,000 comments for a duplicate.
> > > > >
> > > > >
> > > >
> > > > It only checks for duplicates in the current post.
> > > > _______________________________________________
> > > > wp-hackers mailing list
> > > > wp-hackers at lists.automattic.com
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > >
> > >
> > >
> >
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
> 



More information about the wp-hackers mailing list