[wp-trac] [WordPress Trac] #23044: adjacent_image_link() needs optimization
WordPress Trac
noreply at wordpress.org
Tue Aug 20 08:46:16 UTC 2013
#23044: adjacent_image_link() needs optimization
-------------------------+------------------
Reporter: markjaquith | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.7
Component: Query | Version: 3.5
Severity: major | Resolution:
Keywords: has-patch |
-------------------------+------------------
Comment (by westi):
Andy's patch looks neat - last time I optimised this I ended up with up to
6 simple queries to populate {{{post__in}}} to limit the
{{{get_children}}} call which was much more consistently scalable but
still pretty crappy with regard to the number of queries required.
I think it would be good to add some simple unit tests that prove this
sort correctly when there are multiple images with the same menu_order in
both directions and the same as the current image.
It isn't that I doubt it does it is just that is the one thing that
tripped me up before and was how I ended up with 6 queries because I
failed to find a simple single query which reliably worked for all cases
;)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23044#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list