[wp-trac] [WordPress Trac] #11212: Add filter to wp_parse_args()

WordPress Trac wp-trac at lists.automattic.com
Sun Nov 22 02:12:33 UTC 2009


#11212: Add filter to wp_parse_args()
--------------------------+-------------------------------------------------
 Reporter:  Viper007Bond  |       Owner:                
     Type:  enhancement   |      Status:  new           
 Priority:  lowest        |   Milestone:  Future Release
Component:  General       |     Version:  2.9           
 Severity:  normal        |    Keywords:  has-patch     
--------------------------+-------------------------------------------------

Comment(by Viper007Bond):

 Wrote a little test. I have a C2D E6750 (2.66GHz):

 It took 0.3516919613 seconds to do 100000 apply_filters() calls to an
 unhooked filter, or 0.0000035169 seconds per call.

 {{{
 <?php

 require( 'wp-load.php' );

 $count = 100000;

 $start = timer_stop( 0, 10 );

 for ( $i = 1; $i <= $count; $i++ ) {
         apply_filters( 'this_is_a_fake_filter', false );
 }

 $stop = timer_stop( 0, 10 );
 $diff = $stop - $start;
 $per = number_format( $diff / $count, 10 );

 echo 'It took ' . $diff . ' seconds to do ' . $count . ' apply_filters()
 calls to an unhooked filter, or ' . $per . ' seconds per call.';

 ?>
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11212#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list