An eager adoption pairs swapped or reordered raws across slots and aliases the two rows
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- frontend, performance
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 36.1k
- Fork
- 1.1k
- Merge medio
- 11h 32m
- PR unite (30g)
- 356
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di solidjs/solid
-
[2.0 / next] Error formatting and async iterator protocol failures escape memo error handlingAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 14/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
-
[2.0 / next] Outside latest reads of a derivation expose errors and values at different timesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di solidjs/solid
Issue simili
-
`cf complete zsh >> .zshrc` fails on vanilla zshForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#340 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Rename Madson cameraAperta
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 75/100
StoDevX/AAO-React-Native#8785 ·
I maintainer di solito rispondono entro 1 giorno
-
Broken links in the docsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitForse già presa @myOmikron l’ha presa oggi. Apertabug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100