perf: split shared Vue/@nextcloud/vue chunks (~47 MB -> ~24 MB widget JS)#315
Merged
rubenvdlinde merged 1 commit intodevelopmentfrom May 5, 2026
Merged
perf: split shared Vue/@nextcloud/vue chunks (~47 MB -> ~24 MB widget JS)#315rubenvdlinde merged 1 commit intodevelopmentfrom
rubenvdlinde merged 1 commit intodevelopmentfrom
Conversation
Each procest widget entry was inlining its own copy of Vue, @nextcloud/vue, @conduction/nextcloud-vue, pinia and the material-design-icon set, costing ~6.7 MB per bundle. With 7 widget entries that compounded to ~47 MB of duplicated framework JS attached to the dashboard. Webpack 'optimization.splitChunks' now extracts two stable-filename shared chunks (one for Vue + lightweight deps, one for the heavier @nextcloud/vue surface) so each widget keeps only widget-specific code. The shared chunks load once on the page and are cached indefinitely across navigations. Each widget's PHP load() now also Util::addScript()s the two shared chunks. Util::addScript dedupes by (app, file), so even with mydash eagerly loading every widget the shared chunks emit once. After 'npm run build' on the latest @nextcloud/vue: procest-shared-nc-vue.js : (new) 2.79 MB procest-shared-vendor.js : (new) 0.33 MB procest-main.js : 9 MB → 4.73 MB procest-settings.js : 6 MB → 3.35 MB procest-<each>Widget.js : 6.7 MB → 3.00 MB Total widget JS on /apps/mydash/ drops from ~47 MB to ~24 MB on cold load and to per-widget delta on warm cache. Validated locally via mydash page load; no new console errors versus baseline.
Contributor
Quality Report — ConductionNL/procest @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ❌ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ❌ | ||||
| stylelint | ❌ | ||||
| composer | ✅ | ✅ 100/100 | |||
| npm | ❌ | ❌ | |||
| PHPUnit | ⏭️ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-05 06:12 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirror of the same fix that just landed on pipelinq. Each procest widget was inlining its own framework copy; now extracted into shared chunks loaded once.
Bundle sizes after
npm run buildprocest-main.jsprocest-settings.jsprocest-<each>Widget.jsprocest-shared-nc-vue.jsprocest-shared-vendor.jsTotal widget JS on
/apps/mydash/: ~47 MB → ~24 MB cold cache; per-widget delta only on warm cache.Validation
NODE_OPTIONS=--max-old-space-size=8192 npm run build✓/apps/mydash/and confirmed shared chunks load before per-widget bundles ✓Test plan
/apps/mydash/, confirm procest widgets render (cases overview, my tasks, etc.)