An eager adoption pairs swapped or reordered raws across slots and aliases the two rows
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/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, performance
Hướng nghiên cứu
Start in reconcile.ts, especially descend and adoptChild, and review the eager adoption examples described in the issue. The challenge is finding an O(1) way to preserve row identity for raws moved between slots without scanning or allocating; the issue notes that positional identity has different behavior from the held path. Done means swapped and reordered raws retain distinct proxies, including when only one row was proxied, while the immutable update case and reconcile performance remain acceptable.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
An eager (unheld) adoption that receives the same two raws swapped or reordered pairs each slot's existing row with the other raw, and the two rows alias after the commit. On next @ 49a765cc:
const A = { name: "a" };
const B = { name: "b" };
const [server, setServer] = createSignal({ x: A, y: B });
const [store] = createStore(() => server(), {});
createRenderEffect(createMemo(() => store.x.name + store.y.name), () => {});
flush();
// both rows are proxied now
setServer({ x: B, y: A });
flush();
[store.x.name, store.y.name]; // ["a", "b"] — unchanged; expected ["b", "a"] with two distinct proxies
The same holds for an unkeyed array reorder [A, B] to [B, A], and with only one of the rows proxied before the write.
Why
descend in reconcile.ts pairs slot x's target (A's) with B by position, which repoints the family lookup of B to that target; slot y then finds that target through B and pairs it with A again. A raw present in both frames moved, it did not change, and it should stay its own row. The held first-read pairing already follows that rule (#3986, ownRow in adoptChild).
What was tried on #3986
- The rule on every eager pair (
ownRowindescend): +5 B brotli, but a raw set per frame — CodSpeed measured -13% to -25% on the saturated reconcile benches. - The rule behind a once-per-frame scan for a proxied raw at a changed slot (
hasRow): perf back within noise locally, +78 B brotli over the held-only form on createStore.
Both were reverted so the PR ships at +36 B. The tests for the eager cases are in the reverted commits (eae477f6, d20ce530 on fix/adoption-lazy-child-pairing-3712): a record swap and an unkeyed reorder, held and unheld, plus the one-row-proxied swap and the immutable update kept at its slot.
Open question
An O(1) way to tell "this raw is a row of the family at another slot of the incoming frame" without scanning the frame or allocating. Positional identity (the slot keeps its proxy, the lookup of the moved-away raw is dropped) would be O(1) but is the opposite identity choice from the held path's rule.
Generated by Claude Code
- Ngôn ngữ chính
- TypeScript
- Star
- 36.1k
- Fork
- 1.1k
- Merge trung bình
- 10 giờ 44 phút
- Pull request đã merge (30 ngày)
- 339
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
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/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 28/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 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày 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
Tất cả issue của solidjs/solid
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
db-ux-design-system/core-web#8461 ·
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 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Cannot run an integration on windows when power shell is selected as the default profile terminalĐang mởPriority/Blocker Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
wso2/product-integrator#2767 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
severity:low
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày