[wp-trac] [WordPress Trac] #34564: WP_List_Table::get_column_info() inefficient

WordPress Trac noreply at wordpress.org
Tue Mar 9 23:06:21 UTC 2021


#34564: WP_List_Table::get_column_info() inefficient
----------------------------------------+--------------------------
 Reporter:  bobbingwide                 |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  5.8
Component:  Administration              |     Version:  4.3
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:  performance
----------------------------------------+--------------------------

Comment (by peterwilsoncc):

 In the [https://github.com/WordPress/wordpress-develop/pull/1085 linked
 pull request]:

 * only run backward compatibility code if column headers are set
 incorrectly
 * cache backward compatibility fix
 * return cached data immediately if the column headers property contains
 four items

 Consider: changing `count() === 4` condition to check for four or more
 items to account for plugins adding additional items to the cached column
 headers. I really hope this isn't the case.

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


More information about the wp-trac mailing list