Improve Studio packaging build performance - #3785
Conversation
📊 Performance Test ResultsComparing 2655694 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
|
I haven't tested this, but just to make sure we aren't missing anything: there's no guarantee that a clean It looks like this PR assumes that If my understanding of how this works is correct, then there's no guarantee that this approach will continue to work in the future, even if it does now. If there are version conflicts for dependencies across different workspaces, it might break when we link in Let me know if I'm misunderstanding the approach |
sejas
left a comment
There was a problem hiding this comment.
The changes look good to me. I triggered the Buildkite CI to confirm that the builds are still working correctly.
Nice catch! 🙌 You were right, npm does place conflicting versions in per-workspace node_modules (live example: tools/common has ignore@7.0.5 while the hoisted root copy is 5.3.2), so mirroring that layout with symlinks was fragile. I removed the symlink logic in 2655694 |
Related issues
How AI was used in this PR
Codex inspected the packaging flow, implemented and measured a build-time optimization, trimmed the first cache-heavy version after review, and then addressed CI/reviewer feedback around omitted bundle patches and local-build tradeoffs.
Proposed Changes
npm ci --ignore-scriptsand reuses existing bundled WordPress/server files instead of re-downloading them on every build.STUDIO_PACKAGE_FRESH=1for release-grade local builds that should use the slower fresh staging install/download path.node_moduleswas replaced with a realnpm ciin staging — npm lays out the workspace dependency tree itself, so staging can't drift from the real repo's layout. CI E2E exercises the prePackage bundle install (including the win32 path-length guard) on macOS and Windows.Testing Instructions
Pre-merge Checklist