Turbopack: compute exports without full analysis#92823
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Failing test suitesCommit: c56a330 | About building and testing Next.js
Expand output● instant-navigation-testing-api › reload followed by MPA navigation, both block dynamic data ● instant-navigation-testing-api › successive MPA navigations within instant scope ● instant-navigation-testing-api › runtime params are excluded from instant shell › does not include cookie values in instant shell during client navigation ● instant-navigation-testing-api › runtime params are excluded from instant shell › does not include dynamic param values in instant shell during client navigation ● instant-navigation-testing-api › runtime params are excluded from instant shell › does not include search param values in instant shell during client navigation ● instant-navigation-testing-api › runtime params are excluded from instant shell › does not include cookie values in instant shell during page load ● instant-navigation-testing-api › runtime params are excluded from instant shell › does not include dynamic param values in instant shell during page load ● instant-navigation-testing-api › runtime params are excluded from instant shell › does not include search param values in instant shell during page load ● instant-navigation-testing-api › statically generated params are included in instant shell › includes statically generated param values in instant shell during client navigation ● instant-navigation-testing-api › statically generated params are included in instant shell › includes statically generated param values in instant shell during page load ● instant-navigation-testing-api › does not leak runtime data from hover prefetch into instant shell ● instant-navigation-testing-api › subsequent navigations after instant scope are not locked ● instant-navigation-testing-api › throws descriptive error on fresh page without baseURL ● instant-navigation-testing-api › throws descriptive error on fresh page without baseURL ● instant-navigation-testing-api › sets cookie before first navigation when using baseURL ● instant-navigation-testing-api › clears cookie after instant scope exits ● instant-navigation-testing-api › clears cookie even when callback throws ● instant-navigation-testing-api - root params › includes root param in instant shell |
Merging this PR will degrade performance by 3.91%
Performance Changes
Comparing Footnotes
|
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
3de5acb to
de62a96
Compare
d3ce5ad to
d48ce77
Compare
d48ce77 to
c86fa23
Compare
c86fa23 to
3af3a0d
Compare
644a490 to
bf4de72
Compare
3af3a0d to
a0adf74
Compare
a0adf74 to
5af31e2
Compare
5af31e2 to
c56a330
Compare
c56a330 to
0e63b60
Compare
9523c79 to
0e8a749
Compare
355fab1 to
bda7ace
Compare
0e8a749 to
b12a466
Compare
67437c6 to
c4fdcc2
Compare
2cdb01d to
5b1f1c2
Compare
| // cases where `module` is used in some other way. e. g. `const module = 42;`. | ||
| // But a false positive doesn't break anything, it only opts out of some | ||
| // optimizations, which is acceptable. | ||
| if &*i.sym == "module" || &*i.sym == "exports" { |
There was a problem hiding this comment.
can't we check for the unresolved_mark?
There was a problem hiding this comment.
yes, I want to get rid of this AST traversal anyway and merge it into the other one anyway.
| self.cjs = true; | ||
| self.found = true; | ||
| } | ||
| if &*i.sym == "__turbopack_export_value__" { |
There was a problem hiding this comment.
leverage the constants from runtime_functions.rs?
There was a problem hiding this comment.
this code was also just moved around, see my comment above
5b1f1c2 to
d49f65f
Compare
c4fdcc2 to
0e59ef8
Compare
0e59ef8 to
9c9441c
Compare
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URLCommit: 9c9441c |
Tests PassedCommit: 9c9441c |

We don't actually need the full analysis to compute exports. This can break some task cycles, and might theoretically improve task latency.
The CPU time appears to be marginally higher (but not statistically significant), but no impact on overall build time: