[wp-trac] [WordPress Trac] #59544: Performance: Skip iteration in block supports elements when not necessary.

WordPress Trac noreply at wordpress.org
Thu Oct 5 18:02:07 UTC 2023


#59544: Performance: Skip iteration in block supports elements when not necessary.
------------------------------------+--------------------------
 Reporter:  dmsnell                 |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  6.4
Component:  Editor                  |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  performance
------------------------------------+--------------------------

Comment (by dmsnell):

 Correct, @hellofromTonya, and thanks for static. This is why I've tried to
 limit the scope of the patch (discussed [https://github.com/WordPress
 /wordpress-develop/pull/5411#discussion_r1347771720 in the PR]) so that
 it's change is as trim and auditable as possible. I'm currently creating
 additional requested changes, but I prefer we go with that's in the patch
 without the additional changes.

 > between fixing performance and enhancing for refinement

 For context, what led me here is the performance issues with the
 combination of the beta release and the `twentytwentyfour` home page,
 specifically a render with lots of blocks. Without removing those blocks
 and changing `twentytwentyfour` (which in a sense would hide the
 performance issues we're discussing) I started looking to see if there
 were parts of the code that specifically make renders with lots of content
 slow, and this function both stood out and was doing obviously needless
 work.

 I still haven't seen clear evidence that any one thing is responsible for
 the performance issues other than that Core is slow when rendering as much
 complex context as `twentytwentyfour` does, as I think we're seeing the
 exacerbation of many different performance problems that individually
 aren't major. This patch is specifically cutting one of those
 exacerbations in the hot path, which so far seems to be the actual
 `render_block()` portion in my experiments and profiling.

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


More information about the wp-trac mailing list