[wp-trac] [WordPress Trac] #59443: Block Supports: Re-use instance of Tag Processor when adding layout classes

WordPress Trac noreply at wordpress.org
Wed Oct 4 00:15:17 UTC 2023


#59443: Block Supports: Re-use instance of Tag Processor when adding layout classes
---------------------------------------+----------------------------
 Reporter:  dmsnell                    |       Owner:  isabel_brison
     Type:  enhancement                |      Status:  reopened
 Priority:  normal                     |   Milestone:  6.4
Component:  Editor                     |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  gutenberg-merge has-patch  |     Focuses:  performance
---------------------------------------+----------------------------

Comment (by isabel_brison):

 The only thing that changed here is that we're now calling the `add_class`
 method once for each classname, whereas before we were calling it once
 overall and adding all the classnames in one go. There are usually 2-4
 classnames in each layout block, so that could explain the change.

 I'm not sure there's much we can do about it, given that `add_class` has
 ceased supporting strings of multiple classes. @dmsnell I don't suppose
 the newly introduced `class_list` method would be any more performant?

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


More information about the wp-trac mailing list