Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#17353 closed defect (bug) (fixed)

Remove redundant uri lookups in process_default_headers

Reported by: mitchoyoshitaka's profile mitchoyoshitaka Owned by: mitchoyoshitaka's profile mitchoyoshitaka
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: Performance Keywords: has-patch
Focuses: Cc:

Description

process_default_headers currently hits get_template_directory_uri() and get_stylesheet_directory_uri() twice per default header. Considering there are filters on these functions' return values which could potentially be costly, and we expect the values to not change, it makes sense to store them locally once before the loop.

Attachments (1)

17353.diff (1.1 KB) - added by mitchoyoshitaka 14 years ago.

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
14 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.3

#2 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In [18505]:

Call get_(template|stylesheet)_directory_uri() only once in process_default_headers. props mitchoyoshitaka, fixes #17353.

Note: See TracTickets for help on using tickets.