[wp-trac] [WordPress Trac] #23044: adjacent_image_link() needs optimization

WordPress Trac noreply at wordpress.org
Sat Dec 22 05:04:21 UTC 2012


#23044: adjacent_image_link() needs optimization
-------------------------+-------------------------
 Reporter:  markjaquith  |       Type:  enhancement
   Status:  new          |   Priority:  normal
Milestone:  3.6          |  Component:  Query
  Version:  trunk        |   Severity:  major
 Keywords:               |
-------------------------+-------------------------
 `adjacent_image_link()` is really slow and stupid. It queries for
 '''all''' of the images attached to that post. And then it picks the
 previous or next one in PHP. And there's no caching, so you'll typically
 get this happening '''three times''' on an attachment page, (image [linked
 to next], prev link, next link).

 We should actually just make the query grab the ONE image we want.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23044>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list