[wp-trac] [WordPress Trac] #59314: Cache the result of template file lookups

WordPress Trac noreply at wordpress.org
Thu Nov 2 16:18:42 UTC 2023


#59314: Cache the result of template file lookups
-----------------------------------+--------------------------
 Reporter:  joemcgill              |       Owner:  thekt12
     Type:  enhancement            |      Status:  assigned
 Priority:  normal                 |   Milestone:  6.5
Component:  Themes                 |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:  performance
-----------------------------------+--------------------------

Comment (by joemcgill):

 Thanks for updates @thekt12. From your initial research, it was good to
 see confirmation that PHP's internal caching made these repeated
 `file_exists` calls inexpensive. Even though it seemed like there may be
 some potential improvement for file lookups of files that are known to not
 exist, the PoC seems to show that the potential seems fairly minimal and
 likely not worth pursuing further. Do you agree?

 It's also interesting to see the side effects that were introduced into
 `locate_block_template()` for #58746 makes any improvements to that
 function more difficult. That may be something worth refactoring if that
 ends up being a blocker to other improvements we want to make.

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


More information about the wp-trac mailing list