[wpmu-trac] Re: [WordPress MU Trac] #980: Ambiguous filter in
get_blog_option
WordPress MU Trac
wpmu-trac at lists.automattic.com
Tue Jun 30 23:27:19 GMT 2009
#980: Ambiguous filter in get_blog_option
-----------------------+----------------------------------------------------
Reporter: cafespain | Owner: donncha
Type: defect | Status: assigned
Priority: normal | Milestone:
Component: General | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------+----------------------------------------------------
Comment (by jamescollins):
Replying to [comment:2 donncha]:
> I moved back to using switch_to_blog() in [1804]. Is it slower? Feedback
appreciated.
I have created a simple benchmark script (see attached) by adding some
code to the default theme's page.php template.
The script loops over some blogs in the installation, and gets some
wp_option records for each. It does this 100 times.
The benchmark was run by visiting a page on the main blog, which echos the
execution time of the loops.
It was run 10 times on a WPMU trunk installation at r1803 (ie before the
above changeset was applied), and then repeated using r1804 (ie with the
switch_to_blog() functionality in get_blog_option()).
The results were as follows:
r1803 (seconds):
{{{
0.058769941
0.106163979
0.071456909
0.059427023
0.06310606
0.06894207
0.060703039
0.062037945
0.059942961
0.060459137
}}}
r1804 (seconds):
{{{
5.04084301
5.007086992
4.954515934
5.142641068
4.96825099
4.955446959
5.140408993
5.115267038
5.147428989
5.561714888
}}}
Average time for r1803: 0.067100906 secs
Average time for r1804: 5.103360486 secs
So the switch_to_blog() change introduced in r1804 is approximately 76
times slower unfortunately.
--
Ticket URL: <http://trac.mu.wordpress.org/ticket/980#comment:3>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser
More information about the wpmu-trac
mailing list