[wp-trac] [WordPress Trac] #10852: improve get_page_children
WordPress Trac
wp-trac at lists.automattic.com
Thu Oct 1 21:11:44 UTC 2009
#10852: improve get_page_children
--------------------------+-------------------------------------------------
Reporter: hailin | Owner: westi
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 2.9
Component: Optimization | Version: 2.9
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
Comment(by westi):
Replying to [comment:5 hailin]:
> westi:
>
> The test case was realy simple - I just constructed a nested page
tree with about 100 nodes. And put
>
> $t1 = microtime(true);
> get_page_children( $id ); //adjust your id here
> $t2 = microtime(true);
>
> $t = $t2 - $t1;
> echo $t
>
> You can see significant performance gain even with ~ 20 nested nodes.
>
Ok. Did you write any functionality tests or only test performance?
If would be really good when changing things like this for performance to
write the functionality unit tests too to make sure we don't accidentally
introduce a regression.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10852#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list