perf(next-plugin): profile and reuse Turbopack prewarm output - #645
Open
owjs3901 wants to merge 22 commits into
Open
perf(next-plugin): profile and reuse Turbopack prewarm output#645owjs3901 wants to merge 22 commits into
owjs3901 wants to merge 22 commits into
Conversation
Contributor
Changepacks@devup-ui/wasm@1.0.78 - bindings/devup-ui-wasm/package.jsonMaybe you forgot to write the following files to the latest version @devup-ui/next-plugin@1.0.83 - packages/next-plugin/package.jsonMaybe you forgot to write the following files to the latest version |
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
added 11 commits
August 29, 2026 01:05
owjs3901
force-pushed
the
owjs3901/turbo-profile
branch
from
August 28, 2026 16:05
c417e05 to
679c2ec
Compare
added 11 commits
August 29, 2026 01:19
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.
Summary
singleCssprewarm output so Turbopack loaders do not repeat WASM extraction.css.tsor.css.jsis presentbenchmark.jscomparison in the existing Publish workflow: remove Next memory-debug overhead, alternate order, clean Next/Devup output for every sample, and report six-sample mediansNo separate benchmark workflow was added.
Memory and startup impact
pkg/lite/index.js; the full WASM and Webpack adapter are absent fromrequire.cacheThe normal package keeps the existing full feature set. The lite engine is selected only when the static graph succeeds and contains no source or resolved external
.css.ts/.css.jscandidate; graph failure deliberately falls back to full.Validation
wasm-packrelease builds completed for both full and lite packages; no Windows security-policy bypass was usedExisting benchmark.js CI result
Two six-sample attempts at
21fd3cc1used the existing workflow and normalnext build:Raw wall samples:
The median of the 12 same-ordinal Devup-minus-Tailwind deltas is -25 ms, but the two attempt medians split exactly ±30 ms. The defensible conclusion is parity within CI runner noise, not a general performance victory. Typical Devup config time fell from about 90–95 ms before the deferred Webpack fix to 71–76 ms in the retry (Tailwind 11–12 ms). Devup compiled in 3.7–3.8 s versus Tailwind 3.9–4.0 s in that retry, while its richer types took about 333–344 ms versus Tailwind 244–255 ms.
The earlier lite-WASM run still loaded the full engine through the top-level Webpack adapter and measured Devup 7.42 s versus Tailwind 7.30 s. Removing that hidden full-engine load is what changed the config-time and memory behavior.
Structured timings put CSS/sheet/class/file serialization below 1 ms, so batching or debouncing it would add complexity without addressing the measured bottleneck. A Rust/WASM
-O3experiment was also rejected: it increased WASM size and package-build time and produced a 7.61 s Devup median versus 6.95 s Tailwind. The compactz/-Ozsettings remain.Benchmark limits
This is fairer than the previous one-shot fixed-order benchmark, but it is not proof that one library is generally faster. The fixtures are not semantically identical: Tailwind uses untyped class strings and emits its framework CSS, while Devup validates responsive and polymorphic props and emits much less CSS (327 versus 6,197 bytes in the measured fixtures). Next and Devup output caches are removed between samples, and both competitors receive the same treatment, but
tsconfig.tsbuildinfois not removed; these samples are therefore build-output cold, not TypeScript-incremental-state cold. Disabling type checking or weakening inference would reverse the goal and was deliberately not done.bun.lockremains unrelated and is excluded from every commit. The add-bench PR was not touched.