-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] PerformanceRelated to performance effortsRelated to performance efforts
Description
Use of glob()
isn't reliable across distros, and also has some negative performance implications.
Instead of:
foreach ( glob( dirname( __FILE__ ) . '/../block-library/*/index.php' )
We should require_once
each file individually, e.g.:
require_once dirname( dirname( __FILE__ ) ) . '/packages/block-library/src/archives/index.php';
It looks like there aren't that many files in the first place:
$ ls packages/block-library/src/*/index.php | wc -l
6
From #9946 (comment)
Metadata
Metadata
Assignees
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] PerformanceRelated to performance effortsRelated to performance efforts