SSR_BOUNDARY_WATERFALL fires on the first cold render because of lazy route chunks, and its advice points at data
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 15/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Start with the reproduction: run pnpm dev in the linked solid2-mail app, then request a nested route cold and warm to confirm the first-render-only warning. The payload points at fileRoutes() and its components Map in @solidjs/router/fs (dist/fs.js), where each route's lazy() import is cached, and at the SSR_BOUNDARY_WATERFALL diagnostic. The open question is which import causes the third sequential wait, and the author has not pinned it down. Done means the chunk imports start together on the server or the diagnostic stops reporting lazy-module waits as data reads.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
On the first SSR request after the dev server starts, the root <Loading> boundary reports SSR_BOUNDARY_WATERFALL (3 sequential waits). The waits aren't data reads. They come from fileRoutes() wrapping each code-split route component in lazy(). Each nested route level has to import() its module before the router can render the next level, so the chunks load one after another.
The warning's advice ("derive both from the same inputs", "preload the dependent data or join the requests") sends you looking at queries. The app can't fix this through queries: every query is already preloaded in parallel and wrapped in its own nested <Loading>.
Reproduction
App: https://github.com/brenelz/solid2-mail (file routes: (mail) layout → [mailbox]/[threadId] page)
- Start the dev server fresh:
pnpm dev - Make the first request a nested route:
curl -s -o /dev/null http://localhost:5173/inbox/thr-oncall - Request the same URL again.
| Request | Time | Warning |
|---|---|---|
| 1st (cold) | 1.57s | Yes |
| 2nd | 0.012s | No |
| 3rd | 0.011s | No |
[SSR_BOUNDARY_WATERFALL] A <Loading> boundary took 4 render passes — 3 sequential async waits, 173ms end to end: each read could start only after the previous one answered. If a later read doesn't need the earlier answer, derive both from the same inputs so they start together; if the dependency is intrinsic, preload the dependent data or join the requests.
in <Document> › <App> › <Router> › <RouterContextObj> › <Root> › <RootComp> › <Loading>
After you edit a route or component file, the warning comes back once, because Vite invalidates the module and it has to be imported again.
Cause
@solidjs/router/fs → fileRoutes() caches one lazy() component per route src for the lifetime of the process (dist/fs.js, the components Map). On a cold server:
- The
(mail)layout chunk is imported, and the root boundary suspends. - The layout renders and the router reaches the child, so the page chunk is imported and the boundary suspends again.
- One more sequential wait. I didn't pin down which import this is.
After that the lazy components are resolved, render synchronously, and the boundary finishes in one pass.
Expected
One or more of:
- Router: on the server, start every matched route's component import together, the same way route
preloads already run for every matched level, instead of discovering them one level per render pass. - Diagnostics: recognize waits caused by
lazy()module resolution and either skip them or report them separately, with advice about code splitting or eager server imports instead of data reads.
Versions
- solid-js 2.0.0-rc.15
- @solidjs/web 2.0.0-rc.15
- @solidjs/diagnostics 2.0.0-rc.15
- @solidjs/router 2.0.0-next.39
- @solidjs/vite-plugin 3.0.0-next.50
- filesystem-routing 0.4.0
- vite 8.3.4
- macOS (Darwin 25.5.0)
- Ngôn ngữ chính
- TypeScript
- Star
- 36.1k
- Fork
- 1.1k
- Merge trung bình
- 11 giờ 32 phút
- Pull request đã merge (30 ngày)
- 356
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của solidjs/solid
-
[2.0 / next] Error formatting and async iterator protocol failures escape memo error handlingĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 14/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[2.0 / next] Outside latest reads of a derivation expose errors and values at different timesĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của solidjs/solid
Issue tương tự
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitCó thể đã có người làm @myOmikron đã nhận hôm nay. Đang mởbug ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
Windows: mio 1.2.3 named-pipe use-after-free panics the native IPC broker and hangs every toolĐang mởplatform:windows tool triaged wontfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nicolettas-muggelbude/RechnungsFee#448 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Android bug feature/error-tracking react-native team/error-tracking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
PostHog/posthog-js#5310 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày