[wp-trac] [WordPress Trac] #64563: Grunt uglify:core task hangs when wp-content has many files

WordPress Trac noreply at wordpress.org
Wed Jan 28 17:52:11 UTC 2026


#64563: Grunt uglify:core task hangs when wp-content has many files
------------------------------+--------------------------
 Reporter:  westonruter       |       Owner:  westonruter
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  7.0
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch         |     Focuses:  javascript
------------------------------+--------------------------
Changes (by westonruter):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61545" 61545]:
 {{{
 #!CommitTicketReference repository="" revision="61545"
 Build/Test Tools: Optimize `uglify:core` and `copy:files` glob patterns in
 Grunt tasks.

 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 https://github.com/WordPress/wordpress-develop/pull/10809

 Follow up to [61475].

 Props westonruter, jonsurrell.
 See #63606.
 Fixes #64563.
 }}}

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


More information about the wp-trac mailing list