Make WordPress Core

Opened 4 months ago

Last modified 3 months ago

#26744 new enhancement

Twenty Fourteen: reduce the number of queries when there is no featured post

Reported by: Chouby Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.8
Component: Bundled Theme Keywords: has-patch needs-testing
Focuses: Cc:


Thanks to the transient used by Feature_Content::get_featured_post_ids, the featured post ids are not queried at each page load. The transient is however never set if there is no featured post resulting in performance loss.

Attachments (4)

26744.patch (1.4 KB) - added by Chouby 4 months ago.
26744.2.patch (1.2 KB) - added by Chouby 4 months ago.
26744.3.patch (1.3 KB) - added by Chouby 4 months ago.
26744.diff (2.4 KB) - added by obenland 4 months ago.

Download all attachments as: .zip

Change History (7)

Chouby4 months ago

Chouby4 months ago

comment:1 Chouby4 months ago

  • Keywords has-patch added

according to my tests, the proposed patch suppresses 6 queries

Chouby4 months ago

obenland4 months ago

comment:2 obenland4 months ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 3.9

If we trust our cache busting enough, we could just put those sticky post ids in the transient, if there are no tagged posts. ;)

comment:3 lancewillett3 months ago

  • Milestone changed from 3.9 to Future Release
Note: See TracTickets for help on using tickets.