Commit 4ef8507
committed
Build/Test Tools: Optimize
The `uglify:core` and `copy:files` tasks utilized broad negative glob patterns (`!**/*.min.js` and `!**/*.map`) to exclude files from processing. The glob expansion scans the entire `src/` directory tree, including `wp-content`. For environments where `wp-content` contains deep directory structures (such as plugins with `node_modules` dependencies) this traversal becomes prohibitively slow, causing the build process to hang.
This change scopes the exclusion patterns to specific directories (e.g. `wp-admin`, `wp-includes`, default themes, and Akismet), limiting the file scan to relevant core paths and preventing unnecessary recursion into `wp-content`.
In one dev environment, this reduces `npm run build:dev` from 43s to 9s, and `npm run build` from 51s to 13s.
Developed in WordPress#10809
Follow up to [61475].
Props westonruter, jonsurrell.
See #63606.
Fixes #64563.
git-svn-id: https://develop.svn.wordpress.org/trunk@61545 602fd350-edb4-49c9-b593-d223f7449a82uglify:core and copy:files glob patterns in Grunt tasks.1 parent 97b09c8 commit 4ef8507
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
928 | | - | |
| 928 | + | |
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
| |||
0 commit comments