[wp-trac] [WordPress Trac] #16574: Lazy load ancestors
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 16 11:34:22 UTC 2011
#16574: Lazy load ancestors
-------------------------+-----------------------------
Reporter: nacin | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Performance | Version:
Severity: normal | Resolution:
Keywords: 3.2-early |
-------------------------+-----------------------------
Comment (by nacin):
The use case is `get_post_field( 'post_type', $post_id )` or some other
query that doesn't require populating the ancestors. It could even be a
straight get_post() call -- really, the use case doesn't have anything to
do with the suggestion here other than it gave me the idea.
Being able to lazy load ancestors can save a number of queries. They're
fast, but with a complex hierarchy and a number of get_post() calls, they
can add up. Then only the queries are triggered when needed.
Thinking about it some more, this will require a real WP_Post object --
#12267. And is probably only one of a few improvements that can come out
of that.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16574#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list