Skip to content

Bug/contstructor props - #6

Merged
developit merged 2 commits into
masterfrom
bug/contstructor-props
Dec 3, 2015
Merged

Bug/contstructor props#6
developit merged 2 commits into
masterfrom
bug/contstructor-props

Conversation

@developit

Copy link
Copy Markdown
Member

Fixes #5 :)

developit added a commit that referenced this pull request Dec 3, 2015
Pass `props` through Component constructors (fixes #5)
@developit
developit merged commit f6ffd61 into master Dec 3, 2015
@developit
developit deleted the bug/contstructor-props branch December 3, 2015 19:21
marvinhagemeister pushed a commit that referenced this pull request Mar 2, 2019
marvinhagemeister pushed a commit that referenced this pull request Mar 15, 2022
JoviDeCroock added a commit that referenced this pull request Aug 7, 2026
Every normalization branch in the loop wrote through
`newParentVNode._children[i]`, reloading the property each time. Bind
it once and write through the local instead.

-5 B brotli (4582 -> 4577), performance-neutral across update, mount,
keyed-reorder and hydration benchmarks.

This replaces the earlier "avoid allocating arrays for single children"
approach from this branch. Passing the single child unwrapped did win
3-7% on update10th1k, but it cost ~3% on first-paint hydration, so it
was dropped.

For the record, hydrate1k's reported 45-55% regression on that earlier
version was a measurement artifact, not a throughput regression: the
benchmark does exactly 5 warmup hydrations and times the 6th, and each
iteration clones and discards ~8000 DOM nodes, which produces a
deterministic periodic slow hydration every ~4-5 iterations. Each build
has its own phase. Timing only #6 sampled the patched build's slow
phase. Holding the build pair fixed and varying only the warmup count
gave -16.8% / +30.8% / +6.4% / +0.9% / -21.8% / +7.0% for hydrations
5-10 (mean ~+1%), while a main-vs-main control over the same protocol
stayed flat at +0.2% / -0.5% / -1.3%.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant