[wp-trac] [WordPress Trac] #23336: Sticky Posts lack sanity bounding. If used too much, can severely degrade performance.

WordPress Trac noreply at wordpress.org
Fri May 24 14:16:42 UTC 2013


#23336: Sticky Posts lack sanity bounding. If used too much, can severely degrade
performance.
-----------------------------------------+------------------
 Reporter:  markjaquith                  |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  3.6
Component:  Query                        |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |
-----------------------------------------+------------------

Comment (by mboynes):

 @iandunn, I would offer that it's the rare edge case site which needs more
 sticky posts than displays posts per page. And in that edge case, they're
 doing it wrong.

 Just sit back and think about it, and I think you'll see that it makes
 sense. What's the purpose of "Sticky Posts"? To force posts to the top of
 the main loop, right? If you only want to display 10 posts per page (or
 maybe you up it to 20 or so), why would you have 50 sticky posts? Better
 still, lets say you have 10 posts per page and you have 15 sticky posts --
 wouldn't you wonder why there were 15 posts on your homepage, and think
 that was a bug? If anything, what this suggests to me is that sticky posts
 should be woven into the pagination of the loop, but at that point, you'd
 want to overhaul it like
 [http://core.trac.wordpress.org/ticket/23336#comment:5 mbijon suggests],
 using a taxonomy.

 @mbijon, your solution is clever. I think it might open up a gate to big
 and ugly numbers if someone increases their posts per page (e.g. 50 means
 500 sticky posts). I really think that it should just be restricted to
 posts per page.

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


More information about the wp-trac mailing list