[wp-trac] [WordPress Trac] #42513: WP_Theme::get_post_templates() is extremely inefficient for large themes

WordPress Trac noreply at wordpress.org
Wed Feb 12 16:42:26 UTC 2025


#42513: WP_Theme::get_post_templates() is extremely inefficient for large themes
----------------------------------------+-----------------------------
 Reporter:  gschoppe                    |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Themes                      |     Version:  4.8.3
 Severity:  normal                      |  Resolution:
 Keywords:  needs-patch good-first-bug  |     Focuses:  performance
----------------------------------------+-----------------------------
Changes (by swissspidy):

 * keywords:  has-patch needs-unit-tests => needs-patch good-first-bug
 * focuses:  administration, performance => performance
 * milestone:  Awaiting Review => Future Release


Comment:

 Not too worried about the performance impact here as the result is stored
 in cache.

 Being able to use get_file_data() is blocked by #42517.
 Calling `file_get_contents()` only once would be a trivial change that
 makes sense to do.

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


More information about the wp-trac mailing list