[wp-trac] Re: [WordPress Trac] #8590: Very slow after upgrade to 2.7
WordPress Trac
wp-trac at lists.automattic.com
Mon Dec 15 12:28:15 GMT 2008
#8590: Very slow after upgrade to 2.7
---------------------+------------------------------------------------------
Reporter: tin68 | Owner:
Type: defect | Status: reopened
Priority: normal | Milestone:
Component: Upgrade | Version: 2.7
Severity: normal | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Comment (by DD32):
Ok, Change the codeblock:
{{{
$response = array( 'headers' => array(), 'body' => '',
'response' => array('code', 'message') );
foreach( (array) $transports as $transport ) {
$response = $transport->request($url, $r);
if( !is_wp_error($response) )
return $response;
}
}}}
to:
{{{
if(is_admin()) echo " Requesting $url using " . implode(',
', $c = array_map('get_class', $transports));
$response = array( 'headers' => array(), 'body' => '',
'response' => array('code', 'message') );
foreach( (array) $transports as $transport ) {
$timer_http = timer_start();
$response = $transport->request($url, $r);
if(is_admin()) echo ' took ' . timer_stop(0) .
's';
if( !is_wp_error($response) )
return $response;
if(is_admin()) echo get_class($transport) . ' has
failed with error:' . $response->get_error_message();
}
}}}
the {{{if(is_admin())}}} is just there so as not to show it on the public
side of the blog.
--
Ticket URL: <http://trac.wordpress.org/ticket/8590#comment:13>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list