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

WordPress Trac noreply at wordpress.org
Fri Dec 2 04:24:41 UTC 2022


#40731: locate_template() performance improvement
-------------------------------------+------------------------------------
 Reporter:  danielhuesken            |       Owner:  (none)
     Type:  enhancement              |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  Themes                   |     Version:
 Severity:  normal                   |  Resolution:  wontfix
 Keywords:  has-patch needs-testing  |     Focuses:  template, performance
-------------------------------------+------------------------------------
Changes (by peterwilsoncc):

 * status:  reviewing => closed
 * resolution:   => wontfix
 * milestone:  6.2 =>


Comment:

 Given the raw numbers show a 0.004270076751709 millisecond improvement in
 performance under ideal conditions (ie, repeatedly requesting the same set
 of templates), I think this ticket can be closed of without a fix.

 Practically there is a very small performance gain but it alters
 `locate_template()` in such a way that it might become a problem at a
 later date.

 Working on another performance ticket recently, I had to deal with
 complexities caused by the use of static variables so adding once here
 without a significant time improvement isn't worth the risk.

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


More information about the wp-trac mailing list