Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve SSR data handling for pages #3326

Merged
merged 1 commit into from Jan 16, 2023

Conversation

sokra
Copy link
Member

@sokra sokra commented Jan 16, 2023

No description provided.

@sokra sokra requested a review from a team as a code owner January 16, 2023 10:19
@vercel
Copy link

vercel bot commented Jan 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Jan 16, 2023 at 10:19AM (UTC)
9 Ignored Deployments
Name Status Preview Comments Updated
examples-basic-web ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
examples-cra-web ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
examples-designsystem-docs ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
examples-kitchensink-blog ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
examples-native-web ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
examples-nonmonorepo ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
examples-svelte-web ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
examples-tailwind-web ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)
turbo-vite-web ⬜️ Ignored (Inspect) Jan 16, 2023 at 10:19AM (UTC)

@github-actions
Copy link
Contributor

Benchmark for 40d98bc

Click to view benchmark
Test Base PR % Significant %
bench_hmr_to_commit/Turbopack CSR/1000 modules 8080.90µs ± 57.34µs 8088.12µs ± 33.80µs +0.09%
bench_hmr_to_commit/Turbopack RCC/1000 modules 8422.34µs ± 69.51µs 8374.71µs ± 67.88µs -0.57%
bench_hmr_to_commit/Turbopack RSC/1000 modules 477.57ms ± 2.77ms 476.97ms ± 1.65ms -0.13%
bench_hmr_to_commit/Turbopack SSR/1000 modules 8256.10µs ± 53.81µs 8194.90µs ± 63.03µs -0.74%
bench_hmr_to_eval/Turbopack CSR/1000 modules 7244.54µs ± 44.72µs 7171.66µs ± 60.81µs -1.01%
bench_hmr_to_eval/Turbopack RCC/1000 modules 7294.49µs ± 21.40µs 7369.17µs ± 42.74µs +1.02%
bench_hmr_to_eval/Turbopack SSR/1000 modules 7273.76µs ± 34.82µs 7316.79µs ± 51.23µs +0.59%
bench_hydration/Turbopack RCC/1000 modules 3354.59ms ± 10.80ms 3356.15ms ± 14.39ms +0.05%
bench_hydration/Turbopack RSC/1000 modules 2848.98ms ± 9.92ms 2853.64ms ± 9.23ms +0.16%
bench_hydration/Turbopack SSR/1000 modules 2659.47ms ± 5.52ms 2652.51ms ± 9.86ms -0.26%
bench_startup/Turbopack CSR/1000 modules 1646.20ms ± 6.12ms 1640.46ms ± 5.95ms -0.35%
bench_startup/Turbopack RCC/1000 modules 2514.21ms ± 9.00ms 2521.46ms ± 9.45ms +0.29%
bench_startup/Turbopack RSC/1000 modules 2401.74ms ± 8.05ms 2396.74ms ± 9.94ms -0.21%
bench_startup/Turbopack SSR/1000 modules 2049.30ms ± 5.54ms 2050.20ms ± 5.95ms +0.04%

@github-actions
Copy link
Contributor

🟢 CI successful 🟢

Thanks

@ForsakenHarmony
Copy link
Member

Does it make a difference?
_app and _document would have been parsed already

This kinda seems like a micro optimization

@sokra
Copy link
Member Author

sokra commented Jan 16, 2023

Does it make a difference? _app and _document would have been parsed already

This kinda seems like a micro optimization

For client side navigation we only need data, so we can create smaller bundles and faster execution.

But the real reason is that the data transform removes the components from all files in the pages directory, including _app. It crashed when proving undefined for App.

@sokra sokra merged commit 058fc4c into main Jan 16, 2023
@sokra sokra deleted the sokra/web-421-pages-data-requests-do-not-need-_app-or branch January 16, 2023 21:39
NicholasLYang pushed a commit to NicholasLYang/turbo that referenced this pull request Jan 18, 2023
jridgewell pushed a commit to vercel/next.js that referenced this pull request Mar 10, 2023
sokra added a commit to vercel/next.js that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants