[wp-trac] [WordPress Trac] #60749: Interactivity API: Avoid unnecessary processing of directives

WordPress Trac noreply at wordpress.org
Mon Mar 11 20:00:45 UTC 2024


#60749: Interactivity API: Avoid unnecessary processing of directives
--------------------------+--------------------
 Reporter:  joemcgill     |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  high          |  Milestone:  6.5
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+--------------------
 During performance reviews on 6.5, it was discovered that processing
 directives of interactive blocks can sometimes be the source of degraded
 performance.

 This is because all block types that support interactivity are getting
 processed by `wp_interactivity_process_directives_of_interactive_blocks`
 even if the block markup didn't contain the necessary `data-wp-` markup
 necessary for processing, resulting in unnecessary calls to
 `wp_interactivity_process_directives` which make heavy use of the
 `WP_HTML_Tag_Processor`.

 We should try to avoid this unnecessary processing if possible.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/60749>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list