[wp-trac] [WordPress Trac] #40731: locate_template() performance improvement

WordPress Trac noreply at wordpress.org
Tue Jul 11 06:53:58 UTC 2017


#40731: locate_template() performance improvement
-----------------------------------------+---------------------------------
 Reporter:  danielhuesken                |       Owner:
     Type:  enhancement                  |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Themes                       |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:  template,
                                         |  performance
-----------------------------------------+---------------------------------

Comment (by Biont):

 Replying to [comment:5 johnbillion]:
 > Can you let us know in what situation this would improve performance
 please? It appears that performance is only improved with repeated calls
 to locate templates of the same name. Is this is common occurrence?

 This is definetely common. I routinely build wrappers for template
 functions to cache all those filesystem accesses wherever I can. A proper
 system-wide would speed up complex themes noticeably - and practically
 "for free". While this issue does not rank among the worst offenders when
 looking at an average xdebug profile, it certainly does show up an it's
 low-hanging fruit that's easy to tackle.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40731#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list