[wp-trac] [WordPress Trac] #58682: wp_trim_excerpt parses and renders blocks twice

WordPress Trac noreply at wordpress.org
Tue Sep 12 19:18:49 UTC 2023


#58682: wp_trim_excerpt parses and renders blocks twice
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:  flixos90
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.4
Component:  Posts, Post Types                    |     Version:  5.0
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch dev-feedback has-unit-     |     Focuses:
  tests commit                                   |  performance
-------------------------------------------------+-------------------------
Changes (by flixos90):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"56560" 56560]:
 {{{
 #!CommitTicketReference repository="" revision="56560"
 Posts, Post Types: Avoid unnecessarily parsing blocks twice in
 `wp_trim_excerpt()`.

 All blocks relevant for the excerpt are already being parsed in
 `excerpt_remove_blocks()`. Therefore running `do_blocks()` on the post
 content only to create the excerpt is unnecessary and wasteful from a
 performance perspective.

 Props thekt12, spacedmonkey, mukesh27, joemcgill.
 Fixes #58682.
 }}}

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


More information about the wp-trac mailing list