[wp-trac] [WordPress Trac] #52765: Fatal error: Maximum execution time exceeded in _upgrade_422_find_genericons_files_in_folder()

WordPress Trac noreply at wordpress.org
Sat Jul 31 10:29:40 UTC 2021


#52765: Fatal error: Maximum execution time exceeded in
_upgrade_422_find_genericons_files_in_folder()
------------------------------+-----------------------
 Reporter:  bobbingwide       |       Owner:  afragen
     Type:  defect (bug)      |      Status:  assigned
 Priority:  normal            |   Milestone:  5.9
Component:  Upgrade/Install   |     Version:  4.2.2
 Severity:  minor             |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------

Comment (by SergeyBiryukov):

 I was curious to compare the performance of the `array_filter()` approach
 vs. performing the same check in the `foreach` loop below, as suggested in
 comment:7.

 Based on a quick test with 100 iterations, while there is no big
 difference, the `array_filter()` approach seems to be slightly faster:
 {{{
 array_filter(): 71.29304 seconds
 foreach + strpos(): 72.78852 seconds
 foreach + basename(): 74.68676 seconds
 }}}
 So the PR should be good to go.

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


More information about the wp-trac mailing list